Ticket #1629 (closed defect: fixed)
Give tg_paginate_limit=0 a useful meaning
|Reported by:||toshio||Owned by:||anonymous|
Currently, a paginated controller url allows the end user to specify tg_paginate_limit=0. Doing so, however, results in a zeroDivisionError traceback because the paginate decorator doesn't know how to construct a page with zero records on the page. This has been a problem for one of our sites where search robots have been hitting pages with tg_paginate_limit=0 set[*]_.
Separately, I've been looking for a way that end users can tell paginate that they want to view all of the results on one page if they don't know how many results are present in the first place. Since positive numbers and negative numbers both have a meaning to paginate, zero seems like a reasonable choice for this functionality (and has precedent in other tools where zero means turn off this feature.)
I'll attach a patch against 18.104.22.168 which maps tg_paginate_limit=0 to the meaning please display all the data available.