mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 15:03:02 +00:00
Removing display_msg and record name since it can be coded directly as they're needed in the templates
This commit is contained in:
@@ -10,10 +10,6 @@ class Pagination:
|
||||
_default_page = 1
|
||||
_default_per_page = 100
|
||||
_max_per_page = 250
|
||||
_record_name = 'users'
|
||||
_display_msg = (
|
||||
'Displaying {record_name} <b>{start} - {end}</b>. Total {record_name}: {total}'
|
||||
)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""Potential parameters.
|
||||
@@ -21,8 +17,6 @@ class Pagination:
|
||||
**page**: current page in use
|
||||
**per_page**: number of records to display in the page. By default 100
|
||||
**total**: total records considered while paginating
|
||||
**display_msg**: informative text for pagination
|
||||
**record_name**: name of the record, showed in pagination info
|
||||
"""
|
||||
self.page = kwargs.get(self._page_name, 1)
|
||||
|
||||
@@ -30,9 +24,6 @@ class Pagination:
|
||||
self.per_page = self._max_per_page
|
||||
|
||||
self.total = int(kwargs.get('total', 0))
|
||||
self.display_msg = kwargs.get('display_msg', self._display_msg)
|
||||
|
||||
self.record_name = kwargs.get('record_name', self._record_name)
|
||||
self.url = kwargs.get('url') or self.get_url()
|
||||
self.init_values()
|
||||
|
||||
|
Reference in New Issue
Block a user