Index: django/template/__init__.py =================================================================== --- django/template/__init__.py (revision 3709) +++ django/template/__init__.py (working copy) @@ -436,7 +436,7 @@ while i < len(subject) and subject[i] != subject[p]: i += 1 if i >= len(subject): - raise TemplateSyntaxError, "Searching for value. Unexpected end of string in column %d: %s" % subject + raise TemplateSyntaxError, "Searching for value. Unexpected end of string in column %d: %s" % (i, subject) i += 1 res = subject[p:i] while i < len(subject) and subject[i] in (' ', '\t'):