Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #4552 -- minor tidy up of the {% for %} tag's comma splitting

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f6ead36969844bd28277d5b300bf29ae7b67dea8 1 parent 9b432cb
Chris Beaven authored November 21, 2010

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/template/defaulttags.py
2  django/template/defaulttags.py
@@ -725,7 +725,7 @@ def do_for(parser, token):
725 725
         raise TemplateSyntaxError("'for' statements should use the format"
726 726
                                   " 'for x in y': %s" % token.contents)
727 727
 
728  
-    loopvars = re.sub(r' *, *', ',', ' '.join(bits[1:in_index])).split(',')
  728
+    loopvars = re.split(r' *, *', ' '.join(bits[1:in_index]))
729 729
     for var in loopvars:
730 730
         if not var or ' ' in var:
731 731
             raise TemplateSyntaxError("'for' tag received an invalid argument:"

0 notes on commit f6ead36

Please sign in to comment.
Something went wrong with that request. Please try again.