common/test/data/entities.py
author Aurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 03 Mar 2009 14:54:31 +0100
branchtreeview-tabs
changeset 998 9c6ce9d6384f
parent 0 b97547f5f1fa
permissions -rw-r--r--
[treeview] if the client is not interested in maintaining the tree state across page reloads, we must provide a treeid

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'