reverse cursor

Showing 1-2 of 2 messages
reverse cursor John Tantalo 9/28/11 10:30 AM
I stumbled on a recipe to reverse a cursor, thought others might be

> from google.appengine.datastore import datastore_query
> def reverse(cursor):
>  return datastore_query.Cursor.from_websafe_string(cursor).reversed().to_websafe_string()

This can be used to easily implement previous/next pagination.

Example usage:
Re: reverse cursor Sylvain 10/1/11 1:25 AM
I use this :

Easy to go forward, backward and jump from page x to y.