Hi. Just for the curiosity, I did a simple pagination algo which supports 'previous' button. This is not as fancy as rodrigos, because this is not generalized for all types of queries. Also it is bit repetitive because I wanted to keep it easy to understand.
Here is the code: http://pastebin.com/f66e901b1 It assumes following data model: class Issue(db.Model): whatever = db.StringProperty() modified = db.DateTimeProperty() It does sorting based on 'modified' field. The bookmark is (modified| __key__|direction), where direction is either 'prev' or 'next'. Note that because it needs to figure out if there are previous and next pages, it has to do total of 3 queries per page view. I could not figure out better way to do this. On Jan 30, 9:44 pm, Rodrigo Moraes <[email protected]> wrote: > hey there, > just an update: a working version of the query class with built in > pagination is available at: > > http://bitbucket.org/moraes/appengine/src/tip/bookmark.py > > let me know what you think. > > -- rodrigo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
