Not sure if this is what you are looking for, but you could do the
sorting yourself from within python as so:
mylist = mydictionary.items()
mylist.sort(lambda x, y: cmp(x[0], y[0]))
template_values['mylist'] = mylist
And then in your template file:
{% for i in mylist %}
{{i.0}} {{i.1}}
{% endfor %}
On Oct 5, 6:23 am, ell <[EMAIL PROTECTED]> wrote:
> hi,
>
> how do I iterate from a dictionary orderly ?
>
> when i try to iterate from a dictionary i use the lines
>
> {% for i in mydictionary.items %}
>
> {{i.0}} {{i.1}}
>
> {% endfor %}
>
> i seem to get it unorderly? and why is dictionary iteration not in the
> template documentation?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---