From 59453429e7d60e349cd77c4b17b3331d2ba0ce7d Mon Sep 17 00:00:00 2001 From: David D Lowe Date: Fri, 14 Jun 2024 14:17:01 +0100 Subject: [PATCH] Import reverse from django.urls directly The old style is no longer needed. This makes pre-commit tests pass. --- invitations/models.py | 2 +- tests/allauth/test_allauth.py | 2 +- tests/basic/tests.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/invitations/models.py b/invitations/models.py index 90f4267..8a8dd88 100644 --- a/invitations/models.py +++ b/invitations/models.py @@ -6,7 +6,7 @@ try: from django.urls import reverse except ImportError: - from django.core.urlresolvers import reverse + from django.urls import reverse from django.db import models from django.utils import timezone diff --git a/tests/allauth/test_allauth.py b/tests/allauth/test_allauth.py index d4224dd..ed82837 100644 --- a/tests/allauth/test_allauth.py +++ b/tests/allauth/test_allauth.py @@ -3,7 +3,7 @@ try: from django.urls import reverse except ImportError: - from django.core.urlresolvers import reverse + from django.urls import reverse import pytest from allauth.account.models import EmailAddress diff --git a/tests/basic/tests.py b/tests/basic/tests.py index 7844af3..4da11f1 100644 --- a/tests/basic/tests.py +++ b/tests/basic/tests.py @@ -11,7 +11,7 @@ try: from django.urls import reverse except ImportError: - from django.core.urlresolvers import reverse + from django.urls import reverse import pytest from django.contrib.auth.models import AnonymousUser