diff --git a/tailbone/grids/core.py b/tailbone/grids/core.py index ec6e99be..f10dd3e6 100644 --- a/tailbone/grids/core.py +++ b/tailbone/grids/core.py @@ -1053,7 +1053,15 @@ class Grid(object): checked=self.checked(item)) def get_pagesize_options(self): - # TODO: Make configurable or something... + + # use values from config, if defined + options = self.request.rattail_config.getlist('tailbone', 'grid.pagesize_options') + if options: + options = [int(size) for size in options + if size.isdigit()] + if options: + return options + return [5, 10, 20, 50, 100, 200] def has_static_data(self):