@@ -16,10 +16,10 @@ The set of valid parsers for a view is always defined as a list of classes. Whe
...
@@ -16,10 +16,10 @@ The set of valid parsers for a view is always defined as a list of classes. Whe
## Setting the parsers
## Setting the parsers
The default set of parsers may be set globally, using the `DEFAULT_PARSERS` setting. For example, the following settings would allow requests with `YAML` content.
The default set of parsers may be set globally, using the `DEFAULT_PARSER_CLASSES` setting. For example, the following settings would allow requests with `YAML` content.
@@ -18,10 +18,10 @@ For more information see the documentation on [content negotation][conneg].
...
@@ -18,10 +18,10 @@ For more information see the documentation on [content negotation][conneg].
## Setting the renderers
## Setting the renderers
The default set of renderers may be set globally, using the `DEFAULT_RENDERERS` setting. For example, the following settings would use `YAML` as the main media type and also include the self describing API.
The default set of renderers may be set globally, using the `DEFAULT_RENDERER_CLASSES` setting. For example, the following settings would use `YAML` as the main media type and also include the self describing API.
@@ -37,7 +37,7 @@ For clarity inside your code, we recommend using `request.QUERY_PARAMS` instead
...
@@ -37,7 +37,7 @@ For clarity inside your code, we recommend using `request.QUERY_PARAMS` instead
## .parsers
## .parsers
The `APIView` class or `@api_view` decorator will ensure that this property is automatically to a list of `Parser` instances, based on the `parser_classes` set on the view or based on the `DEFAULT_PARSERS` setting.
The `APIView` class or `@api_view` decorator will ensure that this property is automatically to a list of `Parser` instances, based on the `parser_classes` set on the view or based on the `DEFAULT_PARSER_CLASSES` setting.
You won't typically need to access this property.
You won't typically need to access this property.
...
@@ -125,4 +125,4 @@ Note that due to implementation reasons the `Request` class does not inherit fro
...
@@ -125,4 +125,4 @@ Note that due to implementation reasons the `Request` class does not inherit fro
@@ -11,10 +11,10 @@ Configuration for REST framework is all namespaced inside a single Django settin
...
@@ -11,10 +11,10 @@ Configuration for REST framework is all namespaced inside a single Django settin
For example your project's `settings.py` file might include something like this:
For example your project's `settings.py` file might include something like this:
REST_FRAMEWORK = {
REST_FRAMEWORK = {
'DEFAULT_RENDERERS': (
'DEFAULT_RENDERER_CLASSES': (
'rest_framework.renderers.YAMLRenderer',
'rest_framework.renderers.YAMLRenderer',
)
)
'DEFAULT_PARSERS': (
'DEFAULT_PARSER_CLASSES': (
'rest_framework.parsers.YAMLParser',
'rest_framework.parsers.YAMLParser',
)
)
}
}
...
@@ -26,7 +26,7 @@ you should use the `api_settings` object. For example.
...
@@ -26,7 +26,7 @@ you should use the `api_settings` object. For example.
from rest_framework.settings import api_settings
from rest_framework.settings import api_settings
print api_settings.DEFAULT_AUTHENTICATION
print api_settings.DEFAULT_AUTHENTICATION_CLASSES
The `api_settings` object will check for any user-defined settings, and otherwise fallback to the default values. Any setting that uses string import paths to refer to a class will automatically import and return the referenced class, instead of the string literal.
The `api_settings` object will check for any user-defined settings, and otherwise fallback to the default values. Any setting that uses string import paths to refer to a class will automatically import and return the referenced class, instead of the string literal.
...
@@ -34,7 +34,7 @@ The `api_settings` object will check for any user-defined settings, and otherwis
...
@@ -34,7 +34,7 @@ The `api_settings` object will check for any user-defined settings, and otherwis
# API Reference
# API Reference
## DEFAULT_RENDERERS
## DEFAULT_RENDERER_CLASSES
A list or tuple of renderer classes, that determines the default set of renderers that may be used when returning a `Response` object.
A list or tuple of renderer classes, that determines the default set of renderers that may be used when returning a `Response` object.
...
@@ -46,7 +46,7 @@ Default:
...
@@ -46,7 +46,7 @@ Default:
'rest_framework.renderers.TemplateHTMLRenderer'
'rest_framework.renderers.TemplateHTMLRenderer'
)
)
## DEFAULT_PARSERS
## DEFAULT_PARSER_CLASSES
A list or tuple of parser classes, that determines the default set of parsers used when accessing the `request.DATA` property.
A list or tuple of parser classes, that determines the default set of parsers used when accessing the `request.DATA` property.
...
@@ -57,7 +57,7 @@ Default:
...
@@ -57,7 +57,7 @@ Default:
'rest_framework.parsers.FormParser'
'rest_framework.parsers.FormParser'
)
)
## DEFAULT_AUTHENTICATION
## DEFAULT_AUTHENTICATION_CLASSES
A list or tuple of authentication classes, that determines the default set of authenticators used when accessing the `request.user` or `request.auth` properties.
A list or tuple of authentication classes, that determines the default set of authenticators used when accessing the `request.user` or `request.auth` properties.