diff --git a/rest_framework_json_api/relations.py b/rest_framework_json_api/relations.py index b5b36382..7b37e42a 100644 --- a/rest_framework_json_api/relations.py +++ b/rest_framework_json_api/relations.py @@ -2,10 +2,10 @@ import json from collections import OrderedDict +import django import inflection import six from django.core.exceptions import ImproperlyConfigured -from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ from rest_framework.fields import MISSING_ERROR_MESSAGE from rest_framework.relations import MANY_RELATION_KWARGS, PrimaryKeyRelatedField @@ -21,6 +21,11 @@ get_resource_type_from_serializer ) +if django.VERSION >= (1, 10): + from django.urls import NoReverseMatch +else: + from django.core.urlresolvers import NoReverseMatch + LINKS_PARAMS = [ 'self_link_view_name', 'related_link_view_name',
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: