mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00: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:
		| @@ -399,7 +399,7 @@ def language(parser, token): | |||||||
|  |  | ||||||
|     """ |     """ | ||||||
|     bits = token.split_contents() |     bits = token.split_contents() | ||||||
|     if len(bits) < 2: |     if len(bits) != 2: | ||||||
|         raise TemplateSyntaxError("'%s' takes one argument (language)" % bits[0]) |         raise TemplateSyntaxError("'%s' takes one argument (language)" % bits[0]) | ||||||
|     language = parser.compile_filter(bits[1]) |     language = parser.compile_filter(bits[1]) | ||||||
|     nodelist = parser.parse(('endlanguage',)) |     nodelist = parser.parse(('endlanguage',)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user