web/views/navigation.py
changeset 4336 45e5b8bd2f71
parent 4335 1314772c1183
parent 4332 70943fcff808
child 4357 ef8e20bfa287
equal deleted inserted replaced
4335:1314772c1183 4336:45e5b8bd2f71
   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._cw.form.get('__force_display'):
   225     if view.paginable and 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