Skip to content

Commit 20cfeb4

Browse files
committed
fixup! Django 2.0
1 parent efd17a1 commit 20cfeb4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pytest_django/plugin.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,10 @@ def _django_set_urlconf(request):
442442
skip_if_no_django()
443443
import django.conf
444444
try:
445-
from django.core.urlresolvers import clear_url_caches, set_urlconf
446-
except ImportError:
447445
from django.urls import clear_url_caches, set_urlconf
446+
except ImportError:
447+
# Removed in Django 2.0
448+
from django.core.urlresolvers import clear_url_caches, set_urlconf
448449

449450
validate_urls(marker)
450451
original_urlconf = django.conf.settings.ROOT_URLCONF

0 commit comments

Comments
 (0)