Follow naming convention

This commit is contained in:
Oguntunde Caleb 2023-05-12 02:11:54 +01:00
parent 700cbf1966
commit 0e973b9953
3 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ The `api_settings` object will check for any user-defined settings, and otherwis
*The following settings control the basic API policies, and are applied to every `APIView` class-based view, or `@api_view` function based view.*
#### MIDDLEWARE_CLASSES
#### DEFAULT_MIDDLEWARE_CLASSES
A list or tuple of middleware classes, that is run prior to calling the method handler.

View File

@ -29,7 +29,7 @@ from rest_framework import ISO_8601
DEFAULTS = {
# custom middleware class to run prior to calling the method handler
"MIDDLEWARE_CLASSES": [],
"DEFAULT_MIDDLEWARE_CLASSES": [],
# Base API policies
"DEFAULT_RENDERER_CLASSES": [
"rest_framework.renderers.JSONRenderer",

View File

@ -103,7 +103,7 @@ def exception_handler(exc, context):
class APIView(View):
# The following policies may be set at either globally, or per-view.
middleware_classes = api_settings.MIDDLEWARE_CLASSES
middleware_classes = api_settings.DEFAULT_MIDDLEWARE_CLASSES
renderer_classes = api_settings.DEFAULT_RENDERER_CLASSES
parser_classes = api_settings.DEFAULT_PARSER_CLASSES
authentication_classes = api_settings.DEFAULT_AUTHENTICATION_CLASSES