Changes between Version 4 and Version 5 of ServerSidePagination


Ignore:
Timestamp:
01/20/10 02:26:26 (15 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ServerSidePagination

    v4 v5  
    1212Will need to patch into the {{{models\01_RESTlike_Controller}}}.
    1313
    14 We already have options to control this
     14We already have options to filter the results within a busy REST controller, so could do something like:
     15{{{
     16if request.vars.page and request.vars.pagesize:
     17    start = (request.vars.page - 1) * request.vars.pagesize
     18    stop = request.vars.page * request.vars.pagesize
     19    response.s3.filter = (db['%s_%s' % (module, resource)].id > 0).select(limitby=(start, stop))
     20}}}
     21
     22Maybe look at the currently-unused {{{modules/webgrid.py}}}.
    1523
    1624----