new rset argument stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 08 Dec 2009 19:19:01 +0100
branchstable
changeset 4057 a5ec0475601e
parent 4002 4edff8bce44b
child 4058 b3578583b57b
new rset argument
web/views/navigation.py
--- a/web/views/navigation.py	Fri Dec 04 19:53:50 2009 +0100
+++ b/web/views/navigation.py	Tue Dec 08 19:19:01 2009 +0100
@@ -172,8 +172,10 @@
 from cubicweb.view import View
 View.pagination = deprecated('.pagination is deprecated, use paginate')(limit_rset_using_paged_nav)
 
-def paginate(view, show_all_option=True, w=None, page_size=None):
-    limit_rset_using_paged_nav(view, view.req, view.rset, w or view.w,
+def paginate(view, show_all_option=True, w=None, page_size=None, rset=None):
+    if rset is None:
+        rset = view.rset
+    limit_rset_using_paged_nav(view, view.req, rset, w or view.w,
                                not view.need_navigation, show_all_option,
                                page_size=page_size)
 View.paginate = paginate