Hard-code old grid pagecount settings, to avoid edbob.config.

This commit is contained in:
Lance Edgar 2015-08-16 19:52:51 -05:00
parent 3e37ac909e
commit 673fcaed97

View file

@ -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,