Fixed #16402 -- Correctly check for number of arguments to new language template tag. Thanks, Florian Apolloner.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2011-07-04 16:20:03 +00:00
parent a3733967e8
commit 7db68a888b
1 changed files with 1 additions and 1 deletions

View File

@ -399,7 +399,7 @@ def language(parser, token):
"""
bits = token.split_contents()
if len(bits) < 2:
if len(bits) != 2:
raise TemplateSyntaxError("'%s' takes one argument (language)" % bits[0])
language = parser.compile_filter(bits[1])
nodelist = parser.parse(('endlanguage',))