From 2010453bcaaaec2d5cfc59ddd39af0e383d306a2 Mon Sep 17 00:00:00 2001 From: shaunsephton Date: Tue, 6 Jul 2010 14:16:41 +0200 Subject: [PATCH] pass through status --- likes/templatetags/likes_inclusion_tags.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/likes/templatetags/likes_inclusion_tags.py b/likes/templatetags/likes_inclusion_tags.py index fe4bf8a..1ab3e0a 100644 --- a/likes/templatetags/likes_inclusion_tags.py +++ b/likes/templatetags/likes_inclusion_tags.py @@ -7,9 +7,11 @@ @register.inclusion_tag('likes/inclusion_tags/likes.html', takes_context=True) def likes(context, obj): request = context['request'] + can_vote, vote_status = obj.can_vote(request) context.update({ 'content_obj': obj, - 'can_vote': obj.can_vote(request), + 'can_vote': can_vote, + 'vote_status': vote_status, 'content_type': "-".join((obj._meta.app_label, obj._meta.module_name)) }) return context