aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/settings.py
diff options
context:
space:
mode:
authorTom Christie2013-02-01 11:58:55 +0000
committerTom Christie2013-02-01 11:58:55 +0000
commitd9c7b1c58523d63c8118d88f44ebfdf5f35e942a (patch)
tree6efc5a04556b1800756034791ce8aed082f25d4d /rest_framework/settings.py
parent8021bb5d5089955b171173e60dcc0968e13d29ea (diff)
parent0f0e76d8b1b7a7a28b4ce2c6d8f7ecc89e7219ff (diff)
downloaddjango-rest-framework-d9c7b1c58523d63c8118d88f44ebfdf5f35e942a.tar.bz2
Merge branch 'p3k' of https://github.com/linovia/django-rest-framework into working
Conflicts: rest_framework/authentication.py rest_framework/relations.py rest_framework/serializers.py rest_framework/settings.py rest_framework/tests/authentication.py rest_framework/tests/genericrelations.py rest_framework/tests/generics.py rest_framework/tests/relations_hyperlink.py rest_framework/tests/relations_nested.py rest_framework/tests/relations_pk.py rest_framework/tests/serializer.py
Diffstat (limited to 'rest_framework/settings.py')
-rw-r--r--rest_framework/settings.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/rest_framework/settings.py b/rest_framework/settings.py
index 5c77c55c..13d03e62 100644
--- a/rest_framework/settings.py
+++ b/rest_framework/settings.py
@@ -19,6 +19,7 @@ back to the defaults.
"""
from django.conf import settings
from django.utils import importlib
+from rest_framework.compat import six
USER_SETTINGS = getattr(settings, 'REST_FRAMEWORK', None)
@@ -74,6 +75,9 @@ DEFAULTS = {
'URL_FORMAT_OVERRIDE': 'format',
'FORMAT_SUFFIX_KWARG': 'format',
+
+ # Header encoding (see RFC5987)
+ 'HTTP_HEADER_ENCODING': 'iso-8859-1',
}
@@ -98,7 +102,7 @@ def perform_import(val, setting_name):
If the given setting is a string import notation,
then perform the necessary import or imports.
"""
- if isinstance(val, basestring):
+ if isinstance(val, six.string_types):
return import_from_string(val, setting_name)
elif isinstance(val, (list, tuple)):
return [import_from_string(item, setting_name) for item in val]