]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/decorators.py
Removes some unsused context variables, and removes the books module which was not...
[osqa.git] / forum / views / decorators.py
index bae9712332e50a4dce652b0b6b1f996d54326c8f..4eb832a4ab1ea7d6e03c796bcf9d149eeaead29b 100644 (file)
@@ -13,6 +13,9 @@ def render(template=None, tab=None, tab_title='', weight=500, tabbed=True):
         def decorated(request, *args, **kwargs):\r
             context = func(request, *args, **kwargs)\r
 \r
+            if isinstance(context, HttpResponse):\r
+                return context\r
+\r
             if tab is not None:\r
                 context['tab'] = tab\r
 \r
@@ -32,6 +35,9 @@ def list(paginate, default_page_size):
         def decorated(request, *args, **kwargs):\r
             context = func(request, *args, **kwargs)\r
 \r
+            if isinstance(context, HttpResponse):\r
+                return context\r
+\r
             pagesize = request.utils.page_size(default_page_size)\r
             page = int(request.GET.get('page', 1))\r
 \r