From 7db68a888b633f2b65f753d50f21463b65a01edf Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Mon, 4 Jul 2011 16:20:03 +0000 Subject: [PATCH] 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 --- django/templatetags/i18n.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/templatetags/i18n.py b/django/templatetags/i18n.py index edb297404a..c7202e252b 100644 --- a/django/templatetags/i18n.py +++ b/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',))