thanks pankaj. if I were to send the stringlistproperies to a django template how would I iterate thru the 2 stringlists so I can output the 2 values together.
for example if I had a model with 2 stringlistproperties, 1 containing a url and 1 containing the description of the url, how would I get that from my .py code, to the template, and then iterate through the lists in the template to output the url and description together? I appreciate this is probably a very asy question so apologies for my stupidiy On 12/02/2009, Pankaj Vishwani <[email protected]> wrote: > > StringList maintains the order. > Here's the link: > http://code.google.com/appengine/docs/python/datastore/entitiesandmodels.html#Lists > > If you are using StringListProperty, then make sure the list is not > too long else you will hit the wall.. > In my case list can be really long, so I am using BlobProperty to save > key value pair delimited with special character. > > > Regards, > Pankaj Vishwani > > > On Feb 12, 4:45 am, Richard Sage <[email protected]> wrote: >> Thanks Greg, >> If i did this what you suggest, would i be sure that: >> >> listone[0] >> >> would be the the value related to: >> >> listtwo[0] >> I thought i read somewhere that you can't rely on the order you put things >> in to the datastore being the order they came out?? >> >> 2009/2/12 Greg <[email protected]> >> >> >> >> > On Feb 12, 3:10 am, sagey <[email protected]> wrote: >> > > 1) store the 2 strings in a stringlistproperty, with the 2 strings >> > > delimited by a sepcial character >> > > 2) create a class that has 2 string properties and then store each >> > > class in a list >> >> > You can't do 2 - you can only store simple types in lists. But... >> >> > 3) Create two stringlist fields, and use the index of one to access >> > the other. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
