diff options
| author | Tom Christie | 2014-12-05 13:14:14 +0000 |
|---|---|---|
| committer | Tom Christie | 2014-12-05 13:14:14 +0000 |
| commit | 65d6cba75f9db0995020f01e9144b6660feb47d6 (patch) | |
| tree | 1212187336ad9f887a4c69dc805506d49f42b86e /rest_framework/relations.py | |
| parent | 9fb1b396db751234a531dabacb6758ac2645776c (diff) | |
| parent | d9930181ee157f51e2fcea33a3af5ea397647324 (diff) | |
| download | django-rest-framework-65d6cba75f9db0995020f01e9144b6660feb47d6.tar.bz2 | |
Merge pull request #2200 from maryokhin/master
Clean up compat code
Diffstat (limited to 'rest_framework/relations.py')
| -rw-r--r-- | rest_framework/relations.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rest_framework/relations.py b/rest_framework/relations.py index d1ea497a..178a8e2b 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -1,4 +1,4 @@ -from rest_framework.compat import smart_text, urlparse +from django.utils.encoding import smart_text from rest_framework.fields import get_attribute, empty, Field from rest_framework.reverse import reverse from rest_framework.utils import html @@ -6,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 _ @@ -141,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* |
