diff --git a/tailbone/grids/core.py b/tailbone/grids/core.py index 60934879..d475370c 100644 --- a/tailbone/grids/core.py +++ b/tailbone/grids/core.py @@ -985,6 +985,9 @@ class Grid(object): context['empty_labels'] = empty_labels if 'grid_columns' not in context: context['grid_columns'] = self.get_buefy_columns() + context.setdefault('paginated', False) + if context['paginated']: + context.setdefault('per_page', 20) # locate the 'view' action # TODO: this should be easier, and/or moved elsewhere? diff --git a/tailbone/templates/grids/b-table.mako b/tailbone/templates/grids/b-table.mako index 42e82273..8608b456 100644 --- a/tailbone/templates/grids/b-table.mako +++ b/tailbone/templates/grids/b-table.mako @@ -5,6 +5,10 @@ striped hoverable narrowed + % if paginated: + paginated + per-page="${per_page}" + % endif % if vshow is not Undefined and vshow: v-show="${vshow}" % endif diff --git a/tailbone/templates/products/view.mako b/tailbone/templates/products/view.mako index c8f2a5ec..23b6d2ca 100644 --- a/tailbone/templates/products/view.mako +++ b/tailbone/templates/products/view.mako @@ -380,7 +380,7 @@