diff options
| author | Chris Beaven <smileychris@gmail.com> | 2010-11-21 08:03:58 +0000 |
|---|---|---|
| committer | Chris Beaven <smileychris@gmail.com> | 2010-11-21 08:03:58 +0000 |
| commit | f6ead36969844bd28277d5b300bf29ae7b67dea8 (patch) | |
| tree | 9d1e73699fb5c379c44e661207b1b4ea386b4db0 | |
| parent | 9b432cb67bfc0648862cafb49868e670583050df (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.py | 2 |
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:" |
