How to update existing record in app engine.
As long as an entity has a key defined it will be updated on put()
:
record = Record(value='foo')
# This creates a new record
record.put()
record.value = 'shmoo'
# This updates it
record.put()
key = record.key()
record2 = Record.get(key)
record2.value = 'bar'
# Yet again this updates the same record
record2.put()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With