Ticket #1629: turbogears-1.0.3-paginate.patch

File turbogears-1.0.3-paginate.patch, 479 bytes (added by toshio, 7 months ago)

Patch to handle tg_paginate_limit=0

  • paginate.py

    old new  
    147147                    'Variable is not a list or SelectResults or Query (%s)' % type( 
    148148                            var_data)) 
    149149 
     150            # If limit is zero then return all our rows 
     151            if not limit_: 
     152                limit_ = row_count 
    150153            offset = (page-1) * limit_ 
    151154            page_count = int(ceil(float(row_count)/limit_)) 
    152155