I have a pagination that is called by multiple controller, I want to call 
the pagination function by passing few arguments based on my display 
requirement and get the output variables rather than keep typing these 
lines all the time to all the controllers.


def pagination():
    if len(request.args): page=int(request.args[0])
    else: page=0
    items_per_page=int(request.args[1])
    limitby=(page*items_per_page,(page+1)*items_per_page+1)
    return dict(limitby = limitby,page=page,items_per_page=items_per_page)


def item_list():

     items_per_page= 25;#25 for this page
     output = LOAD('default','pagination.load', args=[request.args, 
items_per_page],  ajax=True, ajax_trap=True  )  

This don't seem to call the pagination and how to access limitby, 
items_per_page etc...?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to