common/test/data/entities.py
author Laure Bourgois <Laure.Bourgois@logilab.fr>
Wed, 11 Feb 2009 17:43:33 +0100
changeset 587 c8ff5d88f164
parent 0 b97547f5f1fa
permissions -rw-r--r--
adding views to test

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'