This is Pete's Typepad Profile.
Join Typepad and start following Pete's activity
Pete
Recent Activity
A shorter but less generic way to do this is just to add a one-line property sync after the put() call:
def tx():
# Mess with some other related objects in data store.
# Must fetch a separate copy of self to avoid side effects.
person = db.get(self.key())
person.count += 1
person.put()
self.count = person.count
Google App Engine: Data Duplicity
I've stumbled across a real irritation with the way the Google App Engine data model works. One among many frankly, but I'll restrict myself to just this one for now. The issue stems from the fact that db.run_in_transaction(func) insists that func is a function with no side effects, since it m...
Subscribe to Pete’s Recent Activity