# HG changeset patch # User Alexandre Fayolle # Date 1295256318 -3600 # Node ID 0801dae5bba224e2be00bec180458620d4b88821 # Parent 7a19a4f65573b8c6c85b53c5858c0dcd5e5643d3 added note about the effect of commit/rollback on the hooks_control context manager diff -r 7a19a4f65573 -r 0801dae5bba2 server/hook.py --- a/server/hook.py Fri Jan 14 18:31:46 2011 +0100 +++ b/server/hook.py Mon Jan 17 10:25:18 2011 +0100 @@ -225,8 +225,9 @@ Nothing precludes one to invent new categories and use the -:class:`~cubicweb.server.session.hooks_control` context manager to filter them -in or out. +:class:`~cubicweb.server.session.hooks_control` context manager to +filter them in or out. Note that ending the transaction with commit() +or rollback() will restore the hooks. Hooks specific selector @@ -299,6 +300,7 @@ key=lambda x: x.order) with security_enabled(session, write=False): for hook in hooks: + #print hook.category, hook.__regid__ hook() class HooksManager(object):