aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
authorXavier Ordoquy2015-01-08 23:24:19 +0100
committerXavier Ordoquy2015-01-08 23:24:19 +0100
commit02ee3871ae696da762f144c1fbab2065c70cccef (patch)
treef628ad73c3cab0f99c4820e468d24380336efa05 /rest_framework
parentb7015ea8989d67617d276829ccb6a192362ee01f (diff)
parent4d9e7a53565f6301b87999e6bafdb1c2c3c2af3b (diff)
downloaddjango-rest-framework-02ee3871ae696da762f144c1fbab2065c70cccef.tar.bz2
Merge remote-tracking branch 'origin/master' into release/3.0.3
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/compat.py4
-rw-r--r--rest_framework/settings.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index b1f6f2fa..971dee9c 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -10,7 +10,7 @@ import inspect
from django.core.exceptions import ImproperlyConfigured
from django.utils.encoding import force_text
-from django.utils.six.moves.urllib import parse as urlparse
+from django.utils.six.moves.urllib.parse import urlparse as _urlparse
from django.conf import settings
from django.utils import six
import django
@@ -182,7 +182,7 @@ except ImportError:
class RequestFactory(DjangoRequestFactory):
def generic(self, method, path,
data='', content_type='application/octet-stream', **extra):
- parsed = urlparse.urlparse(path)
+ parsed = _urlparse(path)
data = force_bytes_or_smart_bytes(data, settings.DEFAULT_CHARSET)
r = {
'PATH_INFO': self._get_path(parsed),
diff --git a/rest_framework/settings.py b/rest_framework/settings.py
index 33f84813..fc6dfecd 100644
--- a/rest_framework/settings.py
+++ b/rest_framework/settings.py
@@ -167,7 +167,7 @@ class APISettings(object):
For example:
from rest_framework.settings import api_settings
- print api_settings.DEFAULT_RENDERER_CLASSES
+ print(api_settings.DEFAULT_RENDERER_CLASSES)
Any setting with string import paths will be automatically resolved
and return the class, rather than the string literal.