From e198466d8a3682fb8dd00c1cfa76d0053d0f0b3a Mon Sep 17 00:00:00 2001 From: jhynsoo Date: Wed, 18 Oct 2023 15:14:50 +0900 Subject: [PATCH] chore: Change default renderer classes --- config/settings/base.py | 3 +++ config/settings/local.py | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/config/settings/base.py b/config/settings/base.py index bf6cccd..288c82d 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -143,6 +143,9 @@ REST_FRAMEWORK = { "DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination", "PAGE_SIZE": 20, "DATETIME_FORMAT": "%m/%d %H:%M", + "DEFAULT_RENDERER_CLASSES": [ + "rest_framework.renderers.JSONRenderer", + ], } SESSION_COOKIE_HTTPONLY = False diff --git a/config/settings/local.py b/config/settings/local.py index 16e677c..96613d6 100644 --- a/config/settings/local.py +++ b/config/settings/local.py @@ -28,3 +28,10 @@ INSTALLED_APPS += ["debug_toolbar"] MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"] INTERNAL_IPS = ["127.0.0.1"] + +# renderer class + +REST_FRAMEWORK["DEFAULT_RENDERER_CLASSES"] = [ + "rest_framework.renderers.JSONRenderer", + "rest_framework.renderers.BrowsableAPIRenderer", +]