Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #16402 -- Correctly check for number of arguments to new langua…

…ge template tag. Thanks, Florian Apolloner.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 7db68a888b633f2b65f753d50f21463b65a01edf 1 parent a373396
@jezdez jezdez authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/templatetags/i18n.py
View
2  django/templatetags/i18n.py
@@ -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',))
Please sign in to comment.
Something went wrong with that request. Please try again.