common/test/data/entities.py
author sylvain.thenault@logilab.fr
Tue, 24 Feb 2009 11:34:50 +0100
changeset 934 f94e34795586
parent 0 b97547f5f1fa
permissions -rw-r--r--
better variable/attribute names; fix remove_cube, it should not alter the .fs_schema attribute (former .new_schema)

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'