summaryrefslogtreecommitdiff
path: root/animism-align/cli/app/controllers/crud_controller.py
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/cli/app/controllers/crud_controller.py')
-rw-r--r--animism-align/cli/app/controllers/crud_controller.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/animism-align/cli/app/controllers/crud_controller.py b/animism-align/cli/app/controllers/crud_controller.py
index 29a570a..ace84f3 100644
--- a/animism-align/cli/app/controllers/crud_controller.py
+++ b/animism-align/cli/app/controllers/crud_controller.py
@@ -11,6 +11,7 @@ class CrudView(FlaskView):
# model = Collection
# form = CollectionForm
index_all = True
+ use_limit = True
excluded_methods = ['on_index', 'on_show', 'on_create', 'on_update', 'on_destroy']
default_sort = "id"
default_order = "asc"
@@ -46,7 +47,10 @@ class CrudView(FlaskView):
query = query.order_by(order_by, order_by_id)
else:
query = query.order_by(order_by)
- items = query.offset(offset).limit(limit).all()
+ if self.use_limit:
+ items = query.offset(offset).limit(limit).all()
+ else:
+ items = query.all()
res = self.on_index(session, {
'status': 'ok',