test/data/entities.py
author Aurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 13 May 2009 16:07:44 +0200
branchtls-sprint
changeset 1795 abffc24f93c5
parent 1473 717dea3362c0
child 1977 606923dff11b
permissions -rw-r--r--
on inline form validation, also provide the 'unspecified' placeholder value for empty fields

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'