[google-appengine] Re: Trouble with Multiple StringListProperty() + Django Templates

2008-12-13 Thread Dylan Lorimer
Thanks for the quick reply on this. I got it working with your advice, but am still a bit confused with the end result. On your advice I used Zip on the 2 lists, which resulted in a list of tuples like this: [[(u'image_url', u'image snippet'), (u'image_url_2', u'snippet_2'), (u'image_url_3', u's

[google-appengine] Re: Trouble with Multiple StringListProperty() + Django Templates

2008-12-11 Thread djidjadji
A StringListProperty will always return a list with the items in the order they are appended to the list-property. Otherwise they would have called it StringSetProperty I think. 2008/12/10 Tiago S. <[EMAIL PROTECTED]>: > > Hi, > > I´m planning to do something very similar, but I´m not sure if the

[google-appengine] Re: Trouble with Multiple StringListProperty() + Django Templates

2008-12-10 Thread Tiago S.
Hi, I´m planning to do something very similar, but I´m not sure if the datastore will return both lists in the same order at every request. Does anyone knows what is the expected behavior? I don´t mean to hijack your thread, Dylan, as I thought this would be a nice thread to ask, because my que

[google-appengine] Re: Trouble with Multiple StringListProperty() + Django Templates

2008-12-10 Thread Tiago S.
Hi, I´m planning to do something very similar, but I´m not sure if the datastore will return both lists in the same order at every request. Does anyone knows what is the expected behavior? I don´t mean to hijack your thread, Dylan, as I thought this would be a nice thread to ask, because my que

[google-appengine] Re: Trouble with Multiple StringListProperty() + Django Templates

2008-12-10 Thread Alexander Kojevnikov
In your handler, pass: zip(entity.images, entity.snippets) ...to your template. Let's say the template variable is called "items". Then in the template you can do: {% for image, snippet in items %} Do something with {{ image }} and {{ snippet }}. {% endfor %) Above will work in Django