]> git.openstreetmap.org Git - osqa.git/commitdiff
adding ability to pass extra context to the question_list view
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sat, 19 Nov 2011 16:04:21 +0000 (16:04 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sat, 19 Nov 2011 16:04:21 +0000 (16:04 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1202 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/views/readers.py

index 7404b924c6cd6359ce1b490c4b78a63fbb3552f1..99233e895abd01915576b2a0867a5d442718b094 100644 (file)
@@ -172,7 +172,8 @@ def question_list(request, initial,
                   feed_url=None,
                   paginator_context=None,
                   feed_sort=('-added_at',),
-                  feed_req_params_exclude=(_('page'), _('pagesize'), _('sort'))):
+                  feed_req_params_exclude=(_('page'), _('pagesize'), _('sort')),
+                  extra_context={}):
 
     questions = initial.filter_state(deleted=False)
 
@@ -212,6 +213,7 @@ def question_list(request, initial,
         'tab' : 'questions',
         'feed_url': feed_url,
     }
+    context.update(extra_context)
 
     return pagination.paginated(request,
                                ('questions', paginator_context or QuestionListPaginatorContext()), context)