I think 30 is a good default number of items per page.
This commit is contained in:
parent
dffa0b0983
commit
b9e9610bfe
@ -297,6 +297,8 @@ def setup_gettext(locale):
|
|||||||
translations=this_gettext)
|
translations=this_gettext)
|
||||||
|
|
||||||
|
|
||||||
|
PAGINATION_DEFAULT_PER_PAGE = 30
|
||||||
|
|
||||||
class Pagination(object):
|
class Pagination(object):
|
||||||
"""
|
"""
|
||||||
Pagination class for mongodb queries.
|
Pagination class for mongodb queries.
|
||||||
@ -305,7 +307,7 @@ class Pagination(object):
|
|||||||
get actual data slice through __call__().
|
get actual data slice through __call__().
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, page, cursor, per_page=2):
|
def __init__(self, page, cursor, per_page=PAGINATION_DEFAULT_PER_PAGE):
|
||||||
"""
|
"""
|
||||||
Initializes Pagination
|
Initializes Pagination
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user