Hard-code old grid pagecount settings, to avoid edbob.config
.
This commit is contained in:
parent
3e37ac909e
commit
673fcaed97
|
@ -39,7 +39,6 @@ from webhelpers.html import HTML
|
||||||
|
|
||||||
import formalchemy
|
import formalchemy
|
||||||
|
|
||||||
import edbob
|
|
||||||
from edbob.util import prettify
|
from edbob.util import prettify
|
||||||
|
|
||||||
from .core import Grid
|
from .core import Grid
|
||||||
|
@ -107,13 +106,7 @@ class AlchemyGrid(Grid):
|
||||||
yield row
|
yield row
|
||||||
|
|
||||||
def page_count_options(self):
|
def page_count_options(self):
|
||||||
options = edbob.config.get('edbob.pyramid', 'grid.page_count_options')
|
return [5, 10, 20, 50, 100]
|
||||||
if options:
|
|
||||||
options = options.split(',')
|
|
||||||
options = [int(x.strip()) for x in options]
|
|
||||||
else:
|
|
||||||
options = [5, 10, 20, 50, 100]
|
|
||||||
return options
|
|
||||||
|
|
||||||
def page_links(self):
|
def page_links(self):
|
||||||
return self.pager.pager(self.pager_format,
|
return self.pager.pager(self.pager_format,
|
||||||
|
|
Loading…
Reference in a new issue