entity.py
branchtls-sprint
changeset 1264 fe2934a7df7f
parent 1177 7074698c6522
child 1269 94a5c30575c0
equal deleted inserted replaced
1263:01152fffd593 1264:fe2934a7df7f
   152                          cardinality
   152                          cardinality
   153     """
   153     """
   154     __metaclass__ = metaentity
   154     __metaclass__ = metaentity
   155     __registry__ = 'etypes'
   155     __registry__ = 'etypes'
   156     __select__ = yes()
   156     __select__ = yes()
   157     widgets = {}
   157 
   158     rtags = None
   158     # class attributes that must be set in class definition 
   159     id = None
   159     id = None
   160     e_schema = None
       
   161     eid = None
       
   162     rest_attr = None
   160     rest_attr = None
   163     fetch_attrs = None
   161     fetch_attrs = None
   164     skip_copy_for = ()
   162     skip_copy_for = ()
       
   163     # class attributes set automatically at registration time
       
   164     e_schema = None
       
   165     
   165     @classmethod
   166     @classmethod
   166     def registered(cls, registry):
   167     def registered(cls, registry):
   167         """build class using descriptor at registration time"""
   168         """build class using descriptor at registration time"""
   168         assert cls.id is not None
   169         assert cls.id is not None
   169         super(Entity, cls).registered(registry)
   170         super(Entity, cls).registered(registry)