aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/settings.md
diff options
context:
space:
mode:
authorJamie Matthews2012-09-26 13:05:21 +0100
committerJamie Matthews2012-09-26 13:05:21 +0100
commit01770c53cd9045e6ea054f32b1e40b5d2ff7fe44 (patch)
tree657cb66f92d78add3b2f587754387832043168e6 /docs/api-guide/settings.md
parentf6488cb0589d3b11fb8d831e00d1389f3fff74b6 (diff)
parent09a445b257532be69ffab69a3f62b84bfa90463d (diff)
downloaddjango-rest-framework-01770c53cd9045e6ea054f32b1e40b5d2ff7fe44.tar.bz2
Merge branch 'restframework2' of git://github.com/tomchristie/django-rest-framework into improved-view-decorators
* 'restframework2' of git://github.com/tomchristie/django-rest-framework: (56 commits) Bits of cleanup Add request.QUERY_PARAMS Add readonly 'id' field Tweak browseable API Don't display readonly fields Fix some bits of serialization Add csrf note Fix incorrect bit of tutorial Added tox.ini Tweak media_type -> accepted_media_type. Need to document, but marginally less confusing Tweak media_type -> accepted_media_type. Need to document, but marginally less confusing Tweak media_type -> accepted_media_type. Need to document, but marginally less confusing Clean up bits of templates etc Hack out bunch of unneccesary private methods on View class Clean up template tags Remove dumbass __all__ variables Remove old 'djangorestframework directories Change package name: djangorestframework -> rest_framework Dont strip final '/' Use get_script_prefix to play nicely if not installed at the root. ... Conflicts: rest_framework/decorators.py
Diffstat (limited to 'docs/api-guide/settings.md')
-rw-r--r--docs/api-guide/settings.md28
1 files changed, 14 insertions, 14 deletions
diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md
index 2513928c..0f66e85e 100644
--- a/docs/api-guide/settings.md
+++ b/docs/api-guide/settings.md
@@ -6,16 +6,16 @@
>
> — [The Zen of Python][cite]
-Configuration for REST framework is all namespaced inside a single Django setting, named `API_SETTINGS`.
+Configuration for REST framework is all namespaced inside a single Django setting, named `REST_FRAMEWORK`.
For example your project's `settings.py` file might include something like this:
- API_SETTINGS = {
+ REST_FRAMEWORK = {
'DEFAULT_RENDERERS': (
- 'djangorestframework.renderers.YAMLRenderer',
+ 'rest_framework.renderers.YAMLRenderer',
)
'DEFAULT_PARSERS': (
- 'djangorestframework.parsers.YAMLParser',
+ 'rest_framework.parsers.YAMLParser',
)
}
@@ -24,7 +24,7 @@ For example your project's `settings.py` file might include something like this:
If you need to access the values of REST framework's API settings in your project,
you should use the `api_settings` object. For example.
- from djangorestframework.settings import api_settings
+ from rest_framework.settings import api_settings
print api_settings.DEFAULT_AUTHENTICATION
@@ -37,9 +37,9 @@ A list or tuple of renderer classes, that determines the default set of renderer
Default:
(
- 'djangorestframework.renderers.JSONRenderer',
- 'djangorestframework.renderers.DocumentingHTMLRenderer'
- 'djangorestframework.renderers.TemplateHTMLRenderer'
+ 'rest_framework.renderers.JSONRenderer',
+ 'rest_framework.renderers.DocumentingHTMLRenderer'
+ 'rest_framework.renderers.TemplateHTMLRenderer'
)
## DEFAULT_PARSERS
@@ -49,8 +49,8 @@ A list or tuple of parser classes, that determines the default set of parsers us
Default:
(
- 'djangorestframework.parsers.JSONParser',
- 'djangorestframework.parsers.FormParser'
+ 'rest_framework.parsers.JSONParser',
+ 'rest_framework.parsers.FormParser'
)
## DEFAULT_AUTHENTICATION
@@ -60,8 +60,8 @@ A list or tuple of authentication classes, that determines the default set of au
Default:
(
- 'djangorestframework.authentication.SessionAuthentication',
- 'djangorestframework.authentication.UserBasicAuthentication'
+ 'rest_framework.authentication.SessionAuthentication',
+ 'rest_framework.authentication.UserBasicAuthentication'
)
## DEFAULT_PERMISSIONS
@@ -80,13 +80,13 @@ Default: `()`
**TODO**
-Default: `djangorestframework.serializers.ModelSerializer`
+Default: `rest_framework.serializers.ModelSerializer`
## DEFAULT_PAGINATION_SERIALIZER
**TODO**
-Default: `djangorestframework.pagination.PaginationSerializer`
+Default: `rest_framework.pagination.PaginationSerializer`
## FORMAT_SUFFIX_KWARG