Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 76005c917f96422d4818cb88651f4c8220cf2ad5 1 parent 939f678
Malcolm Tredinnick malcolmt authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 django/template/__init__.py
6 django/template/__init__.py
View
@@ -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 @@ def __init__(self, token, parser):
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):
Please sign in to comment.
Something went wrong with that request. Please try again.