mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-09-16 17:22:32 +03:00
Follow naming convention
This commit is contained in:
parent
700cbf1966
commit
0e973b9953
|
@ -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.*
|
*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.
|
A list or tuple of middleware classes, that is run prior to calling the method handler.
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ from rest_framework import ISO_8601
|
||||||
|
|
||||||
DEFAULTS = {
|
DEFAULTS = {
|
||||||
# custom middleware class to run prior to calling the method handler
|
# custom middleware class to run prior to calling the method handler
|
||||||
"MIDDLEWARE_CLASSES": [],
|
"DEFAULT_MIDDLEWARE_CLASSES": [],
|
||||||
# Base API policies
|
# Base API policies
|
||||||
"DEFAULT_RENDERER_CLASSES": [
|
"DEFAULT_RENDERER_CLASSES": [
|
||||||
"rest_framework.renderers.JSONRenderer",
|
"rest_framework.renderers.JSONRenderer",
|
||||||
|
|
|
@ -103,7 +103,7 @@ def exception_handler(exc, context):
|
||||||
|
|
||||||
class APIView(View):
|
class APIView(View):
|
||||||
# The following policies may be set at either globally, or per-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
|
renderer_classes = api_settings.DEFAULT_RENDERER_CLASSES
|
||||||
parser_classes = api_settings.DEFAULT_PARSER_CLASSES
|
parser_classes = api_settings.DEFAULT_PARSER_CLASSES
|
||||||
authentication_classes = api_settings.DEFAULT_AUTHENTICATION_CLASSES
|
authentication_classes = api_settings.DEFAULT_AUTHENTICATION_CLASSES
|
||||||
|
|
Loading…
Reference in New Issue
Block a user