rpms/TurboGears/EL-4 TurboGears-1.0.3.2-paginate.patch,NONE,1.1

Luke Macken (lmacken) fedora-extras-commits at redhat.com
Tue Dec 18 15:18:41 UTC 2007


Author: lmacken

Update of /cvs/pkgs/rpms/TurboGears/EL-4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11164

Added Files:
	TurboGears-1.0.3.2-paginate.patch 
Log Message:
Add TurboGears-1.0.3.2-paginate.patch backported from upstream (http://trac.turbogears.org/ticket/1629)

TurboGears-1.0.3.2-paginate.patch:

--- NEW FILE TurboGears-1.0.3.2-paginate.patch ---
--- CHANGELOG.txt.orig	2007-12-15 17:27:10.000000000 -0500
+++ CHANGELOG.txt	2007-12-15 17:26:49.000000000 -0500
@@ -1,6 +1,28 @@
 TurboGears Changelog
 ====================
 
+1.0.4 Backports (December 15, 2007):
+------------------------------------
+
+Changes
+~~~~~~~
+
+* Pagination can be disabled by using ``allow_limit_override`` and.
+  ``tg_paginate_limit=0``, allowing all results been returned on one single.
+  page (#1629).
+
+Fixes
+~~~~~
+
+* Paginate does a better handling of zeroed limit, avoiding ZeroDivisionError
+  exception (#1629).
+
+Contributors
+~~~~~~~~~~~~
+
+Toshio Kuratomi
+
+
 1.0.3.2 (July 20, 2007):
 ------------------------
 *Changes*
--- turbogears/paginate.py.orig	2007-12-15 17:20:54.000000000 -0500
+++ turbogears/paginate.py	2007-12-15 17:24:27.000000000 -0500
@@ -147,6 +147,9 @@
                     'Variable is not a list or SelectResults or Query (%s)' % type(
                             var_data))
 
+            # If limit is zero then return all our rows
+            if not limit_:
+                limit_ = row_count or 1
             offset = (page-1) * limit_
             page_count = int(ceil(float(row_count)/limit_))
 




More information about the fedora-extras-commits mailing list