Django template loop over dictionary.items with "items" as key
django, django-templates, python
Solution
Call `dictionary.iteritems` instead? I don't think there's a better way.
If you have no control over dictionary keys, the only safe way is a custom tag for iterating over dicts.
Problem
I have a dictionary in my template that I want to loop through in the usual way ``` {% for key, value in dictionary.items %} ``` But in dictionary I have a key called `'items'`, so my loop return the value of dictionary['items'] and tries to unpack the result as key, value. How can I tell Django to use the function `items` instead of accessing the key?