entity.py
changeset 7876 df15d194a134
parent 7828 749e1a67987f
child 7907 08320697ca1a
equal deleted inserted replaced
7875:65e460690139 7876:df15d194a134
   455 
   455 
   456     def __json_encode__(self):
   456     def __json_encode__(self):
   457         """custom json dumps hook to dump the entity's eid
   457         """custom json dumps hook to dump the entity's eid
   458         which is not part of dict structure itself
   458         which is not part of dict structure itself
   459         """
   459         """
   460         dumpable = dict(self)
   460         dumpable = self.cw_attr_cache.copy()
   461         dumpable['eid'] = self.eid
   461         dumpable['eid'] = self.eid
   462         return dumpable
   462         return dumpable
   463 
   463 
   464     def cw_adapt_to(self, interface):
   464     def cw_adapt_to(self, interface):
   465         """return an adapter the entity to the given interface name.
   465         """return an adapter the entity to the given interface name.