From: jordan Date: Tue, 21 Jun 2011 15:27:01 +0000 (+0000) Subject: pass the request object to the template context, we need it in the tag selector templ... X-Git-Tag: live~245 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/0fbcd0fe6e6c021095691a8a4fd66685d6c8303c?ds=sidebyside;hp=f32668123bbf48a0b73e90024bc09aa60e903ea0 pass the request object to the template context, we need it in the tag selector template for the user subscriptions URL git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1068 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/templatetags/question_list_tags.py b/forum/templatetags/question_list_tags.py index 3ecf1f6..8cef6fc 100644 --- a/forum/templatetags/question_list_tags.py +++ b/forum/templatetags/question_list_tags.py @@ -69,9 +69,10 @@ def tag_selector(context): if request.user.is_authenticated(): pt = MarkedTag.objects.filter(user=request.user) return { + 'request' : request, "interesting_tag_names": pt.filter(reason='good').values_list('tag__name', flat=True), 'ignored_tag_names': pt.filter(reason='bad').values_list('tag__name', flat=True), 'user_authenticated': True, } else: - return {'user_authenticated': False} + return { 'request' : request, 'user_authenticated': False}