Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8970398

Browse files
amwmblayman
authored andcommitted
Fix Django deprecation warning. (#346)
``` RemovedInDjango20Warning: Importing from django.core.urlresolvers is deprecated in favor of django.urls ```
1 parent 89779c4 commit 8970398

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎rest_framework_json_api/views.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import django
22
from django.core.exceptions import ImproperlyConfigured
3-
from django.core.urlresolvers import NoReverseMatch
3+
if django.VERSION >= (1, 10):
4+
from django.urls import NoReverseMatch
5+
else:
6+
from django.core.urlresolvers import NoReverseMatch
47
from django.db.models import Model
58
from django.db.models.query import QuerySet
69
from django.db.models.manager import Manager

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /