Perfect!

Thanks Andi, this has really helped me refactor my code away from a
complete kludge into something almost workable.
its amazing how much i've been trying to code round my lack of
knowledge of python (the project i'm working on is primarily a python/
django/gae learning excercise)


Thanks again


On Mar 9, 1:24 pm, Andi Albrecht <albrecht.a...@googlemail.com> wrote:
> I would zip() both lists on the Python side and iterate over that
> zipped lists in the template, e.g.
>
> # Python side
> newval = zip(stringlist1, stringlist2)
>
> # Template
> {%for item in newval%}
> {{item.0}} and {{item.1}}
> {%endfor%}
>
> Regards,
>
> Andi
>
>
>
> On Mon, Mar 9, 2009 at 2:19 PM,sagey<sage...@gmail.com> wrote:
>
> > Hello,
>
> > please forgive the beginners question.
>
> > I have a model with 2 string list properties.
>
> > How do i iterate through each list in the template at the same time.
>
> > What i mean is, say i wanted to output
>
> > stringlist1value1    and stringlist2value1
> > stringlist1value2    and string list2value2
> > stringlist1value3    and string list2value3
>
> > etc etc
>
> > how would i do this?
>
> > if i were doing this in python code i would maybe increment a
> > loopcount in a for loop
> > but i don't believe i can do this using django template syntax.- Hide 
> > quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to