mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
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:
parent
a3733967e8
commit
7db68a888b
@ -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',))
|
||||
|
Loading…
Reference in New Issue
Block a user