added note about the effect of commit/rollback on the hooks_control context manager stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Mon, 17 Jan 2011 10:25:18 +0100
branchstable
changeset 6831 0801dae5bba2
parent 6830 7a19a4f65573
child 6832 f392e4fb36ec
added note about the effect of commit/rollback on the hooks_control context manager
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):