Ticket #1629: turbogears-1.0.3-paginate.patch
| File turbogears-1.0.3-paginate.patch, 479 bytes (added by toshio, 7 months ago) |
|---|
-
paginate.py
old new 147 147 'Variable is not a list or SelectResults or Query (%s)' % type( 148 148 var_data)) 149 149 150 # If limit is zero then return all our rows 151 if not limit_: 152 limit_ = row_count 150 153 offset = (page-1) * limit_ 151 154 page_count = int(ceil(float(row_count)/limit_)) 152 155