From d54c67d79d0f5661ef33d860efe80a4272e22b3e Mon Sep 17 00:00:00 2001 From: Tymur Maryokhin Date: Thu, 4 Dec 2014 03:11:42 +0100 Subject: Removed custom StringIO, force_text, smart_text compat --- rest_framework/relations.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rest_framework/relations.py') diff --git a/rest_framework/relations.py b/rest_framework/relations.py index d1ea497a..b889acc8 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -1,4 +1,5 @@ -from rest_framework.compat import smart_text, urlparse +from django.utils.encoding import smart_text +from rest_framework.compat import urlparse from rest_framework.fields import get_attribute, empty, Field from rest_framework.reverse import reverse from rest_framework.utils import html -- cgit v1.2.3 From 95af92ca01435c32f4374d26eb448f964d77c81a Mon Sep 17 00:00:00 2001 From: Tymur Maryokhin Date: Thu, 4 Dec 2014 15:47:42 +0100 Subject: Removed custom urlparse compat --- rest_framework/relations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rest_framework/relations.py') diff --git a/rest_framework/relations.py b/rest_framework/relations.py index b889acc8..d0cd3154 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -1,5 +1,4 @@ from django.utils.encoding import smart_text -from rest_framework.compat import urlparse from rest_framework.fields import get_attribute, empty, Field from rest_framework.reverse import reverse from rest_framework.utils import html @@ -7,6 +6,7 @@ from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured from django.core.urlresolvers import resolve, get_script_prefix, NoReverseMatch, Resolver404 from django.db.models.query import QuerySet from django.utils import six +from django.utils.six.moves.urllib import parse as urlparse from django.utils.translation import ugettext_lazy as _ -- cgit v1.2.3 From d9930181ee157f51e2fcea33a3af5ea397647324 Mon Sep 17 00:00:00 2001 From: Tymur Maryokhin Date: Fri, 5 Dec 2014 00:29:28 +0100 Subject: Removed unused imports, pep8 fixes, typo fixes --- rest_framework/relations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rest_framework/relations.py') diff --git a/rest_framework/relations.py b/rest_framework/relations.py index d0cd3154..178a8e2b 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -142,7 +142,7 @@ class PrimaryKeyRelatedField(RelatedField): def get_iterable(self, instance, source_attrs): # For consistency with `get_attribute` we're using `serializable_value()` # here. Typically there won't be any difference, but some custom field - # types might return a non-primative value for the pk otherwise. + # types might return a non-primitive value for the pk otherwise. # # We could try to get smart with `values_list('pk', flat=True)`, which # would be better in some case, but would actually end up with *more* -- cgit v1.2.3