Ticket #4552: for_tag_re_split.patch
File for_tag_re_split.patch, 674 bytes (added by , 14 years ago) |
---|
-
django/template/defaulttags.py
684 684 raise TemplateSyntaxError("'for' statements should use the format" 685 685 " 'for x in y': %s" % token.contents) 686 686 687 loopvars = re.s ub(r' *, *', ',', ' '.join(bits[1:in_index])).split(',')687 loopvars = re.split(r' *, *', ' '.join(bits[1:in_index])) 688 688 for var in loopvars: 689 689 if not var or ' ' in var: 690 690 raise TemplateSyntaxError("'for' tag received an invalid argument:"