test/data/entities.py
author sylvain.thenault@logilab.fr
Thu, 30 Apr 2009 01:20:59 +0200
branchtls-sprint
changeset 1557 d2d5428c7a38
parent 1473 717dea3362c0
child 1977 606923dff11b
permissions -rw-r--r--
fix StringField/TextField handling (XXX remove one of them?, ensure textarea has rows/cols attributes)

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'