aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/settings.md
diff options
context:
space:
mode:
authorTom Christie2012-09-05 21:14:00 +0100
committerTom Christie2012-09-05 21:14:00 +0100
commit224b538b319ad7558e73403278a3932d5564bf75 (patch)
tree5179db1bc164f61bfd986257ab14ef80094d8c10 /docs/api-guide/settings.md
parent3a106aed7958d8a3a31e39415e4b2a5514a41fa1 (diff)
downloaddjango-rest-framework-224b538b319ad7558e73403278a3932d5564bf75.tar.bz2
Tidying up docs
Diffstat (limited to 'docs/api-guide/settings.md')
-rw-r--r--docs/api-guide/settings.md21
1 files changed, 17 insertions, 4 deletions
diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md
index 7ade76b0..fd35fbc6 100644
--- a/docs/api-guide/settings.md
+++ b/docs/api-guide/settings.md
@@ -1,6 +1,7 @@
# Settings
-Settings for REST framework are all namespaced in the `API_SETTINGS` setting.
+Configuration for REST framework is all namespaced inside the `API_SETTINGS` setting.
+
For example your project's `settings.py` file might look like this:
API_SETTINGS = {
@@ -54,10 +55,14 @@ Default if `DEBUG` is `False`:
## DEFAULT_PERMISSIONS
+A list or tuple of permission classes, that determines the default set of permissions checked at the start of a view.
+
Default: `()`
## DEFAULT_THROTTLES
+A list or tuple of throttle classes, that determines the default set of throttles checked at the start of a view.
+
Default: `()`
## DEFAULT_MODEL_SERIALIZER
@@ -78,7 +83,7 @@ The class that should be used to initialize `request.user` for unauthenticated r
Default: `django.contrib.auth.models.AnonymousUser`
-## UNAUTHENTICATED_USER
+## UNAUTHENTICATED_TOKEN
The class that should be used to initialize `request.auth` for unauthenticated requests.
@@ -88,17 +93,23 @@ Default: `None`
The name of a form field that may be used to override the HTTP method of the form.
+If the value of this setting is `None` then form method overloading will be disabled.
+
Default: `'_method'`
## FORM_CONTENT_OVERRIDE
-The name of a form field that may be used to override the content of the form payload.
+The name of a form field that may be used to override the content of the form payload. Must be used together with `FORM_CONTENTTYPE_OVERRIDE`.
+
+If either setting is `None` then form content overloading will be disabled.
Default: `'_content'`
## FORM_CONTENTTYPE_OVERRIDE
-The name of a form field that may be used to override the content type of the form payload.
+The name of a form field that may be used to override the content type of the form payload. Must be used together with `FORM_CONTENT_OVERRIDE`.
+
+If either setting is `None` then form content overloading will be disabled.
Default: `'_content_type'`
@@ -106,4 +117,6 @@ Default: `'_content_type'`
The name of a URL parameter that may be used to override the HTTP `Accept` header.
+If the value of this setting is `None` then URL accept overloading will be disabled.
+
Default: `'_accept'`