aboutsummaryrefslogtreecommitdiffstats
path: root/sneak_peek_tag
diff options
context:
space:
mode:
authorTeddy Wing2014-04-20 13:36:40 -0400
committerTeddy Wing2014-04-20 13:36:40 -0400
commit32a18afffae76053da47350a3ee671ca947860d1 (patch)
tree8dd75e70166536f6c2af1ff3edfbb9b9fc01a848 /sneak_peek_tag
parentba8146d30296d32b9720b274e75d0724c3559909 (diff)
downloaddjango-sneak-peek-32a18afffae76053da47350a3ee671ca947860d1.tar.bz2
sneak_peek.py: fix bug getting user
* Don't try to get 'request' from context since it isn't available unless 'django.core.context_processors.request' is in the TEMPLATE_CONTEXT_PROCESSORS * Turns out that 'user' is already in context, so get it directly instead of having to go through request
Diffstat (limited to 'sneak_peek_tag')
-rw-r--r--sneak_peek_tag/templatetags/sneak_peek.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sneak_peek_tag/templatetags/sneak_peek.py b/sneak_peek_tag/templatetags/sneak_peek.py
index 9a0faa4..977f90a 100644
--- a/sneak_peek_tag/templatetags/sneak_peek.py
+++ b/sneak_peek_tag/templatetags/sneak_peek.py
@@ -21,7 +21,7 @@ class SneakPeekWrapper(Node):
self.style = style
def render(self, context):
- user = context['request'].user
+ user = context['user']
# TODO: update with permission check on user
user_is_blessed = True