]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/decorators.py
Makes tags and users lists use the new paginators, completelly remove the old cnprog...
[osqa.git] / forum / views / decorators.py
index d86a62eee838e1d2bd639bb608a4168de6da124c..2219f98174a36b4721c46f2676ac33b3145c51a0 100644 (file)
@@ -10,7 +10,7 @@ import logging
 \r
 def render(template=None, tab=None, tab_title='', weight=500, tabbed=True):\r
     def decorator(func):\r
-        def decorated(request, *args, **kwargs):\r
+        def decorated(func, request, *args, **kwargs):\r
             context = func(request, *args, **kwargs)\r
 \r
             if isinstance(context, HttpResponse):\r
@@ -26,7 +26,7 @@ def render(template=None, tab=None, tab_title='', weight=500, tabbed=True):
             ui.register(ui.PAGE_TOP_TABS,\r
                         ui.PageTab(tab, tab_title, lambda: reverse(func.__name__), weight=weight))\r
             \r
-        return decorated\r
+        return decorate.withfn(decorated)(func)\r
 \r
     return decorator\r
 \r