Got a question.. How come you cant do:

    {% for k,v in mylist %}

rather than

    {% for i in mylist %}

?

Doesnt work for me at least.

On Oct 6, 2:38 am, Jon <[EMAIL PROTECTED]> wrote:
> 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 yourtemplatefile:
>
>     {% 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 adictionaryorderly ?
>
> > when i try to iterate from adictionaryi use the lines
>
> >  {% for i in mydictionary.items %}
>
> >                   {{i.0}} {{i.1}}
>
> >   {% endfor %}
>
> > i seem to get it unorderly? and why isdictionaryiteration not in the
> >templatedocumentation?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to