?_size=max option, closes #249

This commit is contained in:
Simon Willison 2018-05-04 15:03:40 -03:00
commit d4da4c92c8
No known key found for this signature in database
GPG key ID: 17E2DEA2588B7F52
3 changed files with 6 additions and 2 deletions

View file

@ -869,6 +869,8 @@ class TableView(RowTableShared):
# Handle ?_page_size=500
page_size = request.raw_args.get('_size')
if page_size:
if page_size == 'max':
page_size = self.max_returned_rows
try:
page_size = int(page_size)
if page_size < 0: