cubicweb/entities/schemaobjs.py
changeset 12606 ea15ac05c447
parent 11767 432f87a63057
equal deleted inserted replaced
12604:c755b73640ea 12606:ea15ac05c447
   139 
   139 
   140 class CWConstraint(AnyEntity):
   140 class CWConstraint(AnyEntity):
   141     __regid__ = 'CWConstraint'
   141     __regid__ = 'CWConstraint'
   142     fetch_attrs, cw_fetch_order = fetch_config(['value'])
   142     fetch_attrs, cw_fetch_order = fetch_config(['value'])
   143 
   143 
       
   144     def __repr__(self):
       
   145         return '<Entity %s %s of type %s %s at %s>' % (
       
   146             self.e_schema, self.eid, self.type, list(self.cw_attr_cache), id(self))
       
   147 
   144     def dc_title(self):
   148     def dc_title(self):
   145         return '%s(%s)' % (self.cstrtype[0].name, self.value or u'')
   149         return '%s(%s)' % (self.cstrtype[0].name, self.value or u'')
   146 
   150 
   147     @property
   151     @property
   148     def type(self):
   152     def type(self):