appobject.py
changeset 2802 2251b4aee54a
parent 2799 b703639614e7
child 2804 0d01413ec9ae
equal deleted inserted replaced
2801:7ef4c1c9266b 2802:2251b4aee54a
   276         appobject is returned without any transformation.
   276         appobject is returned without any transformation.
   277         """
   277         """
   278         cls.build___select__()
   278         cls.build___select__()
   279         cls.vreg = registry.vreg
   279         cls.vreg = registry.vreg
   280         pdefs = getattr(cls, 'cw_property_defs', {})
   280         pdefs = getattr(cls, 'cw_property_defs', {})
   281         for propid, pdef in pdefs:
   281         for propid, pdef in pdefs.items():
   282             pdef = pdef.copy() # may be shared
   282             pdef = pdef.copy() # may be shared
   283             pdef['default'] = getattr(cls, propid, pdef['default'])
   283             pdef['default'] = getattr(cls, propid, pdef['default'])
   284             pdef['sitewide'] = getattr(cls, 'site_wide', pdef.get('sitewide'))
   284             pdef['sitewide'] = getattr(cls, 'site_wide', pdef.get('sitewide'))
   285             registry.vreg.register_property(cls._cwpropkey(propid), **pdef)
   285             registry.vreg.register_property(cls._cwpropkey(propid), **pdef)
   286         return cls
   286         return cls