aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2014-04-20 20:30:57 -0400
committerTeddy Wing2014-04-20 20:30:57 -0400
commitdaa1a73f6ce7468314405862f5dc8903fd4c8238 (patch)
tree7fe10aeee34cd297f3131fd79b47eab6193eece8
parent5d0a0bcaa96eefa9981c49ce339cc37a26c81129 (diff)
downloaddjango-sneak-peek-daa1a73f6ce7468314405862f5dc8903fd4c8238.tar.bz2
sneak_peek.py: fix bug `template` not defined
Import `TemplateSyntaxError` directly.
-rw-r--r--sneak_peek_tag/templatetags/sneak_peek.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sneak_peek_tag/templatetags/sneak_peek.py b/sneak_peek_tag/templatetags/sneak_peek.py
index 6578ecc..4b771f4 100644
--- a/sneak_peek_tag/templatetags/sneak_peek.py
+++ b/sneak_peek_tag/templatetags/sneak_peek.py
@@ -1,4 +1,4 @@
-from django.template import Library, Node
+from django.template import Library, Node, TemplateSyntaxError
register = Library()
@@ -11,7 +11,7 @@ def sneak_peek(parser, token):
except ValueError:
pass
if not (style[0] == style[-1] and style[0] in ('"', "'")):
- raise template.TemplateSyntaxError("%r tag's argument should be in quotes" % tag)
+ raise TemplateSyntaxError("%r tag's argument should be in quotes" % tag)
nodelist = parser.parse(('endsneak_peek',))
parser.delete_first_token()
return SneakPeekWrapper(nodelist, style[1:-1])