web/views/navigation.py
branchstable
changeset 4332 70943fcff808
parent 4331 659ca14ab356
child 4336 45e5b8bd2f71
equal deleted inserted replaced
4331:659ca14ab356 4332:70943fcff808
   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 view.paginable ant not view.req.form.get('__force_display'):
   225     if view.paginable and not view.req.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