Changes between Version 12 and Version 13 of ServerSidePagination


Ignore:
Timestamp:
01/20/10 03:32:54 (12 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ServerSidePagination

    v12 v13  
    1919
    2020=== HTML Back-end implementation ===
    21 Patched the {{{models\01_RESTlike_Controller}}} to support {{{http://S3_PUBLIC_URL/module/resource?limit=x&page=y}}}
     21Patched the {{{models\01_RESTlike_Controller}}} to support {{{http://S3_PUBLIC_URL/module/resource?limit=x&start=y}}}
    2222{{{
    2323shn_list()
    2424...
    25     if request.vars.limit:
     25     if request.vars.limit:
    2626        limit = int(request.vars.limit)
    27         if request.vars.page:
    28             page = int(request.vars.page)
    29             start = (page - 1) * limit
    30             stop = page * limit
    31             limitby = (start, stop)
     27        if request.vars.start:
     28            start = int(request.vars.start)
     29            limitby = (start, start + limit)
    3230        else:
    3331            limitby = (0, limit)