Code

Ticket #16402: t16402.diff

File t16402.diff, 469 bytes (added by apollo13, 3 years ago)
Line 
1diff -r 1d89294a8145 django/templatetags/i18n.py
2--- a/django/templatetags/i18n.py       Mon Jul 04 12:23:12 2011 +0000
3+++ b/django/templatetags/i18n.py       Mon Jul 04 16:26:16 2011 +0200
4@@ -399,7 +399,7 @@
5 
6     """
7     bits = token.split_contents()
8-    if len(bits) < 2:
9+    if len(bits) != 2:
10         raise TemplateSyntaxError("'%s' takes one argument (language)" % bits[0])
11     language = parser.compile_filter(bits[1])
12     nodelist = parser.parse(('endlanguage',))