From 3dad86f004e896e826dff0ee30ed6b6c108c7944 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 28 Feb 2021 20:45:41 +1100 Subject: [PATCH] Actually just enable (optional) pagination for every list endpoint --- InvenTree/InvenTree/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 5dbfb845bc..3abb99010f 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -275,12 +275,13 @@ REST_FRAMEWORK = { 'rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.TokenAuthentication', ), + 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', 'DEFAULT_PERMISSION_CLASSES': ( 'rest_framework.permissions.IsAuthenticated', 'rest_framework.permissions.DjangoModelPermissions', 'InvenTree.permissions.RolePermission', ), - 'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema' + 'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema', } WSGI_APPLICATION = 'InvenTree.wsgi.application'