server/hook.py
changeset 4339 fe93b670343d
parent 4307 7fba9c34c88f
child 4341 2d2aa2526c56
equal deleted inserted replaced
4338:0eb7efcbcee1 4339:fe93b670343d
    80         kwargs['event'] = event
    80         kwargs['event'] = event
    81         for hook in sorted(self.possible_objects(req, **kwargs), key=lambda x: x.order):
    81         for hook in sorted(self.possible_objects(req, **kwargs), key=lambda x: x.order):
    82             if hook.enabled:
    82             if hook.enabled:
    83                 hook()
    83                 hook()
    84             else:
    84             else:
    85                 warn('[3.6] %s: enabled is deprecated' % self.__class__)
    85                 warn('[3.6] %s: enabled is deprecated' % hook.__class__)
    86 
    86 
    87 VRegistry.REGISTRY_FACTORY['hooks'] = HooksRegistry
    87 VRegistry.REGISTRY_FACTORY['hooks'] = HooksRegistry
    88 
    88 
    89 
    89 
    90 def entity_oldnewvalue(entity, attr):
    90 def entity_oldnewvalue(entity, attr):