Permalink
Browse files

templatetag now uses request.user instead of relying on user to be in…

… the context
  • Loading branch information...
1 parent fc68f23 commit 1ef7d0e046aad97cb87ef591e6c0dfc2708ed7df @lukeman lukeman committed Aug 4, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 flag/templatetags/flag_tags.py
View
5 flag/templatetags/flag_tags.py
@@ -12,10 +12,11 @@ def flag(context, content_object, creator_field):
app_label = content_object._meta.app_label,
model = content_object._meta.module_name
)
+ request = context["request"]
return {
"content_type": content_type.id,
"object_id": content_object.id,
"creator_field": creator_field,
- "request": context["request"],
- "user": context["user"],
+ "request": request,
+ "user": request.user,
}

0 comments on commit 1ef7d0e

Please sign in to comment.