python - Wait for datastore changes before redirecting -
very similar this question, except answer not suitable.
i populate table datastore query, there link allowing user delete specific row. clicking link goes url deletes row datastore redirects table.
changes more not aren't shown in table until reloading again.
easy solution redirect page, uses javascript redirect add delay of couple of seconds. other alternative send details page action=delete&key=### , make sure item missed table. that's pain though.
the answer ancestor queries. https://cloud.google.com/appengine/docs/python/datastore/queries#python_ancestor_queries
create entities parent. when 1 of entities deleted, can run ancestor query table list view have strong consistency when data changed.
example ancestor query:
tom = person(key_name='tom') photo_query = photo.all() photo_query.ancestor(tom)
Comments
Post a Comment