chore: Change default renderer classes

This commit is contained in:
jhynsoo 2023-10-18 15:14:50 +09:00
parent c3993d39e7
commit e198466d8a
2 changed files with 10 additions and 0 deletions

View File

@ -143,6 +143,9 @@ REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination", "DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination",
"PAGE_SIZE": 20, "PAGE_SIZE": 20,
"DATETIME_FORMAT": "%m/%d %H:%M", "DATETIME_FORMAT": "%m/%d %H:%M",
"DEFAULT_RENDERER_CLASSES": [
"rest_framework.renderers.JSONRenderer",
],
} }
SESSION_COOKIE_HTTPONLY = False SESSION_COOKIE_HTTPONLY = False

View File

@ -28,3 +28,10 @@ INSTALLED_APPS += ["debug_toolbar"]
MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"] MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"]
INTERNAL_IPS = ["127.0.0.1"] INTERNAL_IPS = ["127.0.0.1"]
# renderer class
REST_FRAMEWORK["DEFAULT_RENDERER_CLASSES"] = [
"rest_framework.renderers.JSONRenderer",
"rest_framework.renderers.BrowsableAPIRenderer",
]