When rendering dictionary, there is absolutely no way to display values sorted by keys. The only workaround is to copy all the dict items to a sortable structure e.g. list and pass the list to the template, instead of the dictionary.
Why not introduce a new tag to solve this problem: I say, it should be called {%secretfor%} and the usage would be {%secretfor k,v in mydict %} ... do stuff.... {%endsecretfor%} would work like sorted(mydict.keys) I won't stick with the tag name, but you see my point. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.