#12965: unordered_list template filter fails when given a non-iterable second item in a two item list -----------------------------+---------------------------------------------- Reporter: grahamu | Owner: nobody Status: new | Milestone: Component: Template system | Version: 1.2-beta Keywords: | Stage: Unreviewed Has_patch: 1 | -----------------------------+---------------------------------------------- When unordered_list processes a list with just two items it fails if the second item is not iterable.
Once convert_old_style_list() determines that 'second_item' is not an empty list, it assumes that item is an iterable. That certainly is true for lists, tuples, and strings. However, if the second item is a non- iterable object the code doesn't work. Nothing in the documentation suggests that the unordered_list filter only accepts iterables, so I think this is a bug. I've attached a patch with an associated test in regressiontests/defaultfilters/tests.py, but am unsure about whether a test is also needed in regressiontests/templates/filters.py. -- Ticket URL: <http://code.djangoproject.com/ticket/12965> Django <http://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-upda...@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.