Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #2102 -- Template system 'for' loops now support generators. Th…

…anks, dbm-django@mclachlan.com.au

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3165 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 6b730e1e92eb85beb3d3f7401ee5dce50895d758 1 parent 136752c
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  django/template/defaulttags.py
View
2  django/template/defaulttags.py
@@ -88,6 +88,8 @@ def render(self, context):
values = []
if values is None:
values = []
+ if not hasattr(values, '__len__'):
+ values = list(values)
len_values = len(values)
if self.reversed:
# From http://www.python.org/doc/current/tut/node11.html
Please sign in to comment.
Something went wrong with that request. Please try again.