test/data/entities.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 27 May 2009 16:36:17 +0200
branchstable
changeset 1967 28eed65ce1e6
parent 1473 717dea3362c0
child 1977 606923dff11b
permissions -rw-r--r--
don't crash if inlined_relation is not defined on the form

from cubicweb.entities import AnyEntity, fetch_config

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

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


class Note(AnyEntity):
    id = 'Note'