summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Beaven <smileychris@gmail.com>2010-11-21 08:03:58 +0000
committerChris Beaven <smileychris@gmail.com>2010-11-21 08:03:58 +0000
commitf6ead36969844bd28277d5b300bf29ae7b67dea8 (patch)
tree9d1e73699fb5c379c44e661207b1b4ea386b4db0
parent9b432cb67bfc0648862cafb49868e670583050df (diff)
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
-rw-r--r--django/template/defaulttags.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
index 2dc95f4b8c..3d9b7f9829 100644
--- a/django/template/defaulttags.py
+++ b/django/template/defaulttags.py
@@ -725,7 +725,7 @@ def do_for(parser, token):
raise TemplateSyntaxError("'for' statements should use the format"
" 'for x in y': %s" % token.contents)
- loopvars = re.sub(r' *, *', ',', ' '.join(bits[1:in_index])).split(',')
+ loopvars = re.split(r' *, *', ' '.join(bits[1:in_index]))
for var in loopvars:
if not var or ' ' in var:
raise TemplateSyntaxError("'for' tag received an invalid argument:"