I'm trying to fetch results in a python2.7
appengine app using cursors, but each time I use with_cursor()
it fetches the same result set.
query = Model.all().filter("profile =", p_key).order('-created')
if r.get('cursor'):
query = query.with_cursor(start_cursor = r.get('cursor'))
cursor = query.cursor()
objs = query.fetch(limit=10)
count = len(objs)
for obj in objs:
...
Each time through I'm getting same 10 results. I'm thinkng it has to do with using end_cursor
, but how do I get that value if query.cursor()
is returning the start_cursor
. I've looked through the docs but this is poorly documented.