common/test/data/entities.py
author Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
Tue, 09 Dec 2008 09:00:29 +0100
changeset 195 aa7d98f8f07f
parent 0 b97547f5f1fa
permissions -rw-r--r--
Added tag cubicweb-version-2_99_3 for changeset 8280fa6906f3

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'