summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-04-25 07:05:31 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-04-25 07:05:31 +0000
commit76005c917f96422d4818cb88651f4c8220cf2ad5 (patch)
tree507360fbb9c581549082c6579ca92c72acafc138
parent939f678e6542949e3befd83437d58860b9abac34 (diff)
Fixed #3948 -- Added some extra relevant information to FilterExpression
parse-related error message. Thanks, philippe.raoult@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5067 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/template/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/template/__init__.py b/django/template/__init__.py
index 0d8990a42b..a32b3f5a0b 100644
--- a/django/template/__init__.py
+++ b/django/template/__init__.py
@@ -123,10 +123,10 @@ class VariableDoesNotExist(Exception):
def __init__(self, msg, params=()):
self.msg = msg
self.params = params
-
+
def __str__(self):
return self.msg % self.params
-
+
class InvalidTemplateLibrary(Exception):
pass
@@ -555,7 +555,7 @@ class FilterExpression(object):
filters.append( (filter_func,args))
upto = match.end()
if upto != len(token):
- raise TemplateSyntaxError, "Could not parse the remainder: %s" % token[upto:]
+ raise TemplateSyntaxError, "Could not parse the remainder: '%s' from '%s'" % (token[upto:], token)
self.var, self.filters = var, filters
def resolve(self, context, ignore_failures=False):