[google-appengine] Re: delete an entry in a stringlistproperty

2009-03-16 Thread Tim Hoffman
Yep You do need to save back so do the person.put() Also pop will return the entity removed from the the list in case you need to use it for something. (ie a message saying URL was deleted etc...) See ya T On Mar 17, 5:05 am, sagey wrote: > Thanks for the help. > > If as you suggest i pop th

[google-appengine] Re: delete an entry in a stringlistproperty

2009-03-16 Thread sagey
Thanks for the help. If as you suggest i pop the element i want to delete, do i then need to: person.put() In order to write the changes back to the datastore? Sorry if this question is really obvious, but i'm not finding the gae documentation the most useful. On Mar 16, 4:40 pm, "M. Page-L

[google-appengine] Re: delete an entry in a stringlistproperty

2009-03-16 Thread M. Page-Lieberman
Sage. Python makes your life a lot easier. On Mar 16, 2009, at 11:18, Tim Hoffman wrote: > > Nah > > try: > >index = keylist.index(keyIWantToFind) > >keylist.pop(index) >urlist.pop(index) >nameslist.pop(index) > except ValueError: >pass > > or > > index = keylist.find( keyIW

[google-appengine] Re: delete an entry in a stringlistproperty

2009-03-16 Thread Tim Hoffman
Nah try: index = keylist.index(keyIWantToFind) keylist.pop(index) urlist.pop(index) nameslist.pop(index) except ValueError: pass or index = keylist.find( keyIWantToFind) if index > -1: keylist.pop(index) urlist.pop(index) nameslist.pop(index) Remember a ListP