common/test/data/entities.py
author Sandrine Ribeau <sandrine.ribeau@logilab.fr>
Tue, 11 Nov 2008 15:37:31 -0800
changeset 24 b5303abf484a
parent 0 b97547f5f1fa
permissions -rw-r--r--
Add a FAQ and started a section on views selector.

from cubicweb.entities import AnyEntity, fetch_config

class Personne(AnyEntity):
    """customized class forne Person entities"""
    id = 'Personne'
    fetch_attrs, fetch_order = fetch_config(['nom', 'prenom'])
    rest_attr = 'nom'


class Societe(AnyEntity):
    id = 'Societe'
    fetch_attrs = ('nom',)
    
class AnotherNote(AnyEntity):
    id = 'AnotherNote'