cuckoobox/cuckoo — pull request #100 by pdelsante (2013-05-03 08:32:59+00:00)
Title: Adding pagination to web.py and api.py

The modification of api.py is trivial, while in web.py I am basically adding a new route:

@route("/browse-page//")

Both parameters are optional and, while the first defaults to 1, the second is only used when you want to set a new pagination size (default value is 50 results per page). When set to a non-default value, the pagination size is stored in a cookie to be kept between different browser sessions.

Some of the code of the old route "/browse" was put into a separate function parse_tasks(), that helps making it reusable.