__init__.py
branchstable
changeset 5081 2ea98b8512dd
parent 4475 37c413a07216
child 5421 8167de96c523
--- a/__init__.py	Tue Mar 30 13:31:21 2010 +0200
+++ b/__init__.py	Tue Mar 30 13:32:01 2010 +0200
@@ -112,7 +112,7 @@
 
 CW_EVENT_MANAGER = CubicWebEventManager()
 
-def onevent(event):
+def onevent(event, *args, **kwargs):
     """decorator to ease event / callback binding
 
     >>> from cubicweb import onevent
@@ -123,6 +123,6 @@
     >>>
     """
     def _decorator(func):
-        CW_EVENT_MANAGER.bind(event, func)
+        CW_EVENT_MANAGER.bind(event, func, *args, **kwargs)
         return func
     return _decorator