mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Moved PAGINATE_COUNT to configuration.py
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
from django.conf import settings
|
||||
from django.core.paginator import Paginator, Page
|
||||
|
||||
|
||||
class EnhancedPaginator(Paginator):
|
||||
|
||||
def __init__(self, object_list, per_page, **kwargs):
|
||||
per_page = getattr(settings, 'PAGINATE_COUNT', 50)
|
||||
super(EnhancedPaginator, self).__init__(object_list, per_page, **kwargs)
|
||||
|
||||
def _get_page(self, *args, **kwargs):
|
||||
return EnhancedPage(*args, **kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user