web/views/navigation.py
changeset 4335 1314772c1183
parent 4283 b3c40ae2d045
parent 4331 659ca14ab356
child 4336 45e5b8bd2f71
equal deleted inserted replaced
4334:dda74c345b06 4335:1314772c1183
   220 
   220 
   221 def paginate(view, show_all_option=True, w=None, page_size=None, rset=None):
   221 def paginate(view, show_all_option=True, w=None, page_size=None, rset=None):
   222     """paginate results if the view is paginable and we're not explictly told to
   222     """paginate results if the view is paginable and we're not explictly told to
   223     display everything (by setting __force_display in req.form)
   223     display everything (by setting __force_display in req.form)
   224     """
   224     """
   225     if not (view.paginable or view._cw.form.get('__force_display')):
   225     if view.paginable ant not view._cw.form.get('__force_display'):
   226         do_paginate(view, rset, w or view.w, show_all_option, page_size)
   226         do_paginate(view, rset, w or view.w, show_all_option, page_size)
   227 
   227 
   228 # monkey patch base View class to add a .paginate([...])
   228 # monkey patch base View class to add a .paginate([...])
   229 # method to be called to write pages index in the view and then limit the result
   229 # method to be called to write pages index in the view and then limit the result
   230 # set to the current page
   230 # set to the current page