diff options
| author | Tom Christie | 2012-09-07 09:36:52 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-09-07 09:36:52 +0100 |
| commit | 01d6a0899e4435417f774196b08e0613bd0a51f7 (patch) | |
| tree | 118d29048d2df9100928830c6c65d45e590f0c6e /djangorestframework/settings.py | |
| parent | c648f2786f37ffe0b64ed2d85de2b7b491ee341b (diff) | |
| download | django-rest-framework-01d6a0899e4435417f774196b08e0613bd0a51f7.tar.bz2 | |
Bits of cleanup
Diffstat (limited to 'djangorestframework/settings.py')
| -rw-r--r-- | djangorestframework/settings.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/djangorestframework/settings.py b/djangorestframework/settings.py index 6e6ab3c2..e0b6a5d5 100644 --- a/djangorestframework/settings.py +++ b/djangorestframework/settings.py @@ -13,10 +13,12 @@ API_SETTINGS = { ) } +This module provides the `api_setting` object, that is used to access +REST framework settings, checking for user settings first, then falling +back to the defaults. """ from django.conf import settings from django.utils import importlib -from djangorestframework.compat import yaml DEFAULTS = { @@ -35,17 +37,16 @@ DEFAULTS = { ), 'DEFAULT_PERMISSIONS': (), 'DEFAULT_THROTTLES': (), + 'UNAUTHENTICATED_USER': 'django.contrib.auth.models.AnonymousUser', 'UNAUTHENTICATED_TOKEN': None, + 'FORM_METHOD_OVERRIDE': '_method', 'FORM_CONTENT_OVERRIDE': '_content', 'FORM_CONTENTTYPE_OVERRIDE': '_content_type', 'URL_ACCEPT_OVERRIDE': '_accept' } -if yaml: - DEFAULTS['DEFAULT_RENDERERS'] += ('djangorestframework.renderers.YAMLRenderer', ) - # List of settings that may be in string import notation. IMPORT_STRINGS = ( @@ -97,7 +98,8 @@ class APISettings(object): from djangorestframework.settings import api_settings print api_settings.DEFAULT_RENDERERS - Any setting with string import paths will be resolved. + Any setting with string import paths will be automatically resolved + and return the class, rather than the string literal. """ def __getattr__(self, attr): if attr not in DEFAULTS.keys(): |
