server/hooksmanager.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 08 Mar 2010 19:02:35 +0100
changeset 4834 b718626a0e60
parent 4517 0f3c10fc42b2
child 5421 8167de96c523
permissions -rw-r--r--
move hooks activation control on session object, so we can have a per transaction control. Added a new `hooks_control` context manager for usual modification of hooks activation.

from logilab.common.deprecation import class_renamed, class_moved
from cubicweb.server import hook
SystemHook = class_renamed('SystemHook', hook.Hook)
PropagateSubjectRelationHook = class_renamed('PropagateSubjectRelationHook',
                                             hook.PropagateSubjectRelationHook)
PropagateSubjectRelationAddHook = class_renamed('PropagateSubjectRelationAddHook',
                                                hook.PropagateSubjectRelationAddHook)
PropagateSubjectRelationDelHook = class_renamed('PropagateSubjectRelationDelHook',
                                                hook.PropagateSubjectRelationDelHook)
Hook = class_moved(hook.Hook)