diff options
| author | Tom Christie | 2012-09-06 16:46:56 +0100 | 
|---|---|---|
| committer | Tom Christie | 2012-09-06 16:46:56 +0100 | 
| commit | c648f2786f37ffe0b64ed2d85de2b7b491ee341b (patch) | |
| tree | ec5aec07f56e0ca302d33f44d64a5a800ec8bc92 /docs/api-guide/settings.md | |
| parent | 9dc7270cced6be898ff1c3a8855bf196bd89b912 (diff) | |
| download | django-rest-framework-c648f2786f37ffe0b64ed2d85de2b7b491ee341b.tar.bz2 | |
TODO notes in docs
Diffstat (limited to 'docs/api-guide/settings.md')
| -rw-r--r-- | docs/api-guide/settings.md | 17 | 
1 files changed, 17 insertions, 0 deletions
| diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md index 882571e1..1411b9ec 100644 --- a/docs/api-guide/settings.md +++ b/docs/api-guide/settings.md @@ -13,6 +13,17 @@ For example your project's `settings.py` file might look like this:          )      } +## Accessing settings + +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 +     +    print api_settings.DEFAULT_AUTHENTICATION + +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. +  ## DEFAULT_RENDERERS  A list or tuple of renderer classes, that determines the default set of renderers that may be used when returning a `Response` object. @@ -61,14 +72,20 @@ Default: `()`  ## DEFAULT_MODEL_SERIALIZER +**TODO** +  Default: `djangorestframework.serializers.ModelSerializer`  ## DEFAULT_PAGINATION_SERIALIZER +**TODO** +  Default: `djangorestframework.pagination.PaginationSerializer`  ## FORMAT_SUFFIX_KWARG +**TODO** +  Default: `'format'`  ## UNAUTHENTICATED_USER | 
