Commits

Anonymous committed 60a8020

[svn] Adding Pylons example for paginate.

Comments (0)

Files changed (1)

webhelpers/pagination/__init__.py

     ORM you'd like with the Paginator as it will give you the offset/limit 
     data necessary to make your own query.
     
+    If you fail to pass in a page value, paginate will attempt to find a page
+    value in the QUERY_STRING from environ, or the Routes match dict. This 
+    feature only works if routes was used to resolve the URL.
+    
+    Example::
+        
+        # Using an SQLAlchemy object with assign_mapper under Pylons
+        # with an order_by passed in
+        c.paginator, c.people = paginate(model.Person,
+                                         order_by=[model.Person.c.date])
+    
     **WARNING:** Unless you pass in an item_count, a count will be performed 
     on the collection every time paginate is called. If using an ORM, it's 
     suggested that you count the items yourself and/or cache them.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.