#16335: Cannot iterate defaultdict in template
-------------------------------+---------------------------------
 Reporter:  jacob.ninja.dev@…  |          Owner:  nobody
     Type:  Bug                |         Status:  new
Milestone:                     |      Component:  Template system
  Version:  1.3                |       Severity:  Normal
 Keywords:                     |   Triage Stage:  Unreviewed
Has patch:  0                  |  Easy pickings:  1
    UI/UX:  0                  |
-------------------------------+---------------------------------
 I am unable to iterate a defaultdict using a for loop in a template.

 Code to reproduce issue:


 {{{
 dictionary = defaultdict(list)
 dictionary['foo'].append('bar')

 {% for key, value in dictionary.items %}
   {# Never iterates #}
 {% endfor %}
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16335>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to