From 5a7ee11e01ad4467ce8838806ef4644bb59032b4 Mon Sep 17 00:00:00 2001 From: jhyns Date: Wed, 3 May 2023 14:23:20 +0900 Subject: [PATCH] Add default pagination class --- config/settings/base.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/settings/base.py b/config/settings/base.py index dff02f5..cad6fd7 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -124,3 +124,14 @@ DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" # Custom User Model AUTH_USER_MODEL = "user.User" + + +# Rest framework settings + +REST_FRAMEWORK = { + "DEFAULT_AUTHENTICATION_CLASSES": [ + "rest_framework.authentication.SessionAuthentication", + ], + "DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination", + "PAGE_SIZE": 20, +}