test/data/entities.py
author sylvain.thenault@logilab.fr
Mon, 23 Mar 2009 13:07:26 +0100
branchtls-sprint
changeset 1130 17ff4d4bfbd0
parent 744 4da6e0f4df2a
child 1473 717dea3362c0
permissions -rw-r--r--
should call clear, not empth (thanks pylint)

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 Note(AnyEntity):
    id = 'Note'