== Server-Side Pagination == Currently we do all pagination client-side which won't be possible to keep doing as we accumulate more data * http://datatables.net/examples/data_sources/server_side.html This will be needed for: * [wiki:HaitiRMSToDo Request Management System] * [wiki:HaitiOrgsToDo Organisation Registry] * [wiki:HaitiVolToDo Volunteer Registry] fractalis has offered to look at this === Status === * The Back-end is now done for HTML representation * The Back-end needs doign for JSON representation * The Front-end still needs doing === HTML Back-end implmentation === Patched the {{{models\01_RESTlike_Controller}}}. {{{ shn_list() ... if request.vars.limit: limit = int(request.vars.limit) if request.vars.page: page = int(request.vars.page) start = (page - 1) * limit stop = page * limit limitby = (start, stop) else: limitby = (0, limit) else: limitby = None ... items = crud.select(table, query=query, ... limitby=limitby, ... ) }}} === Other Options === Maybe look at the currently-unused {{{modules/webgrid.py}}}. pagenav in {{{models\01_RESTlike_Controller}}} seems unused currently...was an older implementation of a webgrid...can probably be removed. ---- [wiki:Haiti]