X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/f23e8f623a0670883682399799d40abda730ff16..0a3506ef33141207e7e879fe763dc3adacbc591e:/forum/views/decorators.py diff --git a/forum/views/decorators.py b/forum/views/decorators.py index bae9712..4eb832a 100644 --- a/forum/views/decorators.py +++ b/forum/views/decorators.py @@ -13,6 +13,9 @@ def render(template=None, tab=None, tab_title='', weight=500, tabbed=True): def decorated(request, *args, **kwargs): context = func(request, *args, **kwargs) + if isinstance(context, HttpResponse): + return context + if tab is not None: context['tab'] = tab @@ -32,6 +35,9 @@ def list(paginate, default_page_size): def decorated(request, *args, **kwargs): context = func(request, *args, **kwargs) + if isinstance(context, HttpResponse): + return context + pagesize = request.utils.page_size(default_page_size) page = int(request.GET.get('page', 1))