From: jordan Date: Wed, 16 May 2012 22:57:24 +0000 (+0000) Subject: the contributors_info template tag should tag context and pass it X-Git-Tag: live~53 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/49d564d448e70875b1e89875e31a34af2e49e4ba the contributors_info template tag should tag context and pass it git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1264 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/templatetags/node_tags.py b/forum/templatetags/node_tags.py index 9e0482f..be54232 100644 --- a/forum/templatetags/node_tags.py +++ b/forum/templatetags/node_tags.py @@ -253,12 +253,13 @@ def _comments(post, user): def comments(post, user): return _comments(post, user) -@register.inclusion_tag("node/contributors_info.html") -def contributors_info(node, verb=None): +@register.inclusion_tag("node/contributors_info.html", takes_context=True) +def contributors_info(context, node, verb=None): return { 'node_verb': verb and verb or ((node.node_type == "question") and _("asked") or ( (node.node_type == "answer") and _("answered") or _("posted"))), 'node': node, + 'context' : context } @register.inclusion_tag("node/reviser_info.html")