On Feb 15, 6:34 am, thebrianschott <schott.br...@gmail.com> wrote: > I have tried this code, but the "next" copy with "joan2" does not get > put() into the datastore, only the original copy with "joan". Can you > tell me how to do this without doing it attribute by attribute, > please? > This line:
nextplace=place ... does not copy the entity but makes variable `nextplace` point to the same entity as `place`. You can copy the property values like this: nextplace = Group(key_name="joan2") nextplace.place = place.place nextplace.zoom = place.zoom nextplace.put() Alternatively, you can loop on all properties using Model.properties() [1] and call getattr/setattr to copy the property values. [1] http://code.google.com/appengine/docs/python/datastore/modelclass.html#Model_properties --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---