From 16cd985be280170e73ba1aabfadec93509e7f2a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpeters@entrouvert.com>
Date: Wed, 1 Apr 2020 16:18:28 +0200
Subject: [PATCH 1/5] trivial: import reverse from django.urls (#41285)

---
 combo/apps/assets/__init__.py       | 2 +-
 combo/apps/assets/views.py          | 2 +-
 combo/apps/dashboard/views.py       | 2 +-
 combo/apps/dataviz/models.py        | 2 +-
 combo/apps/gallery/views.py         | 2 +-
 combo/apps/lingo/__init__.py        | 2 +-
 combo/apps/lingo/manager_views.py   | 4 ++--
 combo/apps/lingo/models.py          | 2 +-
 combo/apps/lingo/views.py           | 2 +-
 combo/apps/maps/__init__.py         | 2 +-
 combo/apps/maps/manager_views.py    | 2 +-
 combo/apps/maps/models.py           | 2 +-
 combo/apps/pwa/__init__.py          | 2 +-
 combo/apps/pwa/manager_views.py     | 2 +-
 combo/apps/search/__init__.py       | 2 +-
 combo/apps/wcs/__init__.py          | 2 +-
 combo/apps/wcs/views.py             | 2 +-
 combo/manager/templatetags/cells.py | 2 +-
 combo/manager/views.py              | 2 +-
 combo/monkeypatch.py                | 2 +-
 combo/public/admin.py               | 2 +-
 combo/urls_utils.py                 | 2 +-
 tests/test_assets.py                | 2 +-
 tests/test_calendar.py              | 2 +-
 tests/test_cells.py                 | 2 +-
 tests/test_dashboard.py             | 2 +-
 tests/test_gallery_cell.py          | 2 +-
 tests/test_lingo_payment.py         | 2 +-
 tests/test_lingo_remote_regie.py    | 2 +-
 tests/test_manager.py               | 2 +-
 tests/test_maps_cells.py            | 2 +-
 tests/test_notification.py          | 2 +-
 tests/test_public.py                | 2 +-
 tests/test_pwa.py                   | 2 +-
 tests/test_search.py                | 2 +-
 tests/test_wcs.py                   | 2 +-
 36 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/combo/apps/assets/__init__.py b/combo/apps/assets/__init__.py
index 6098ca3c..8dd1c9f9 100644
--- a/combo/apps/assets/__init__.py
+++ b/combo/apps/assets/__init__.py
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import django.apps
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils.translation import ugettext_lazy as _
 
 
diff --git a/combo/apps/assets/views.py b/combo/apps/assets/views.py
index 8e04b262..7e036a71 100644
--- a/combo/apps/assets/views.py
+++ b/combo/apps/assets/views.py
@@ -22,7 +22,7 @@ from django.conf import settings
 from django.contrib import messages
 from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
 from django.core.files.storage import default_storage
-from django.core.urlresolvers import reverse, reverse_lazy
+from django.urls import reverse, reverse_lazy
 from django.http import Http404, HttpResponse
 from django.shortcuts import get_object_or_404
 from django.shortcuts import redirect
diff --git a/combo/apps/dashboard/views.py b/combo/apps/dashboard/views.py
index 706272b0..9c8bf9d4 100644
--- a/combo/apps/dashboard/views.py
+++ b/combo/apps/dashboard/views.py
@@ -19,7 +19,7 @@ import json
 from django.conf import settings
 from django.contrib.contenttypes.models import ContentType
 from django.core.exceptions import PermissionDenied
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.db.models import Max, Min
 from django.http import Http404, HttpResponse, HttpResponseRedirect
 from django.utils.encoding import force_text
diff --git a/combo/apps/dataviz/models.py b/combo/apps/dataviz/models.py
index 756cafe2..ee9593a5 100644
--- a/combo/apps/dataviz/models.py
+++ b/combo/apps/dataviz/models.py
@@ -17,7 +17,7 @@
 import copy
 import os
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.db import models
 from django.utils.encoding import force_text
 from django.utils.translation import ugettext_lazy as _, ungettext, gettext
diff --git a/combo/apps/gallery/views.py b/combo/apps/gallery/views.py
index 06a17767..2cfd0ff7 100644
--- a/combo/apps/gallery/views.py
+++ b/combo/apps/gallery/views.py
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-from django.core.urlresolvers import reverse, reverse_lazy
+from django.urls import reverse, reverse_lazy
 from django.shortcuts import redirect
 from django.views.generic import (TemplateView, RedirectView, DetailView,
         CreateView, UpdateView, ListView, DeleteView, FormView)
diff --git a/combo/apps/lingo/__init__.py b/combo/apps/lingo/__init__.py
index 6f0469fa..27921f71 100644
--- a/combo/apps/lingo/__init__.py
+++ b/combo/apps/lingo/__init__.py
@@ -18,7 +18,7 @@ import datetime
 import logging
 
 import django.apps
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils import timezone
 from django.utils.translation import ugettext_lazy as _
 
diff --git a/combo/apps/lingo/manager_views.py b/combo/apps/lingo/manager_views.py
index 56ebc1cf..98efa6bd 100644
--- a/combo/apps/lingo/manager_views.py
+++ b/combo/apps/lingo/manager_views.py
@@ -18,8 +18,8 @@ import csv
 import datetime
 from dateutil import parser as date_parser
 
-from django.core.urlresolvers import reverse
-from django.core.urlresolvers import reverse_lazy
+from django.urls import reverse
+from django.urls import reverse_lazy
 from django.db.models import Q, Prefetch
 from django.db.models.expressions import RawSQL
 from django.utils import six
diff --git a/combo/apps/lingo/models.py b/combo/apps/lingo/models.py
index b3d45952..e5d799ef 100644
--- a/combo/apps/lingo/models.py
+++ b/combo/apps/lingo/models.py
@@ -34,7 +34,7 @@ from django.forms import models as model_forms, Select
 from django.utils.translation import ugettext_lazy as _
 from django.utils import timezone, dateparse, six
 from django.core.mail import EmailMultiAlternatives
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
 from django.utils.encoding import python_2_unicode_compatible
 from django.utils.formats import localize
diff --git a/combo/apps/lingo/views.py b/combo/apps/lingo/views.py
index 2ebd3e8f..6cbd7519 100644
--- a/combo/apps/lingo/views.py
+++ b/combo/apps/lingo/views.py
@@ -22,7 +22,7 @@ import requests
 
 from django.contrib.auth.models import User
 from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.core import signing
 from django.http import HttpResponse, HttpResponseNotFound, HttpResponseRedirect, HttpResponseBadRequest
 from django.http import HttpResponseForbidden, Http404, JsonResponse
diff --git a/combo/apps/maps/__init__.py b/combo/apps/maps/__init__.py
index 9d4d1e06..cd655715 100644
--- a/combo/apps/maps/__init__.py
+++ b/combo/apps/maps/__init__.py
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import django.apps
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils.translation import ugettext_lazy as _
 
 
diff --git a/combo/apps/maps/manager_views.py b/combo/apps/maps/manager_views.py
index f3c29fe3..a960ab71 100644
--- a/combo/apps/maps/manager_views.py
+++ b/combo/apps/maps/manager_views.py
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-from django.core.urlresolvers import reverse, reverse_lazy
+from django.urls import reverse, reverse_lazy
 from django.http import Http404
 from django.shortcuts import get_object_or_404
 from django.utils.translation import ugettext_lazy as _
diff --git a/combo/apps/maps/models.py b/combo/apps/maps/models.py
index 26af1f7d..23aa170a 100644
--- a/combo/apps/maps/models.py
+++ b/combo/apps/maps/models.py
@@ -24,7 +24,7 @@ from django.utils.encoding import python_2_unicode_compatible
 from django.utils.html import escape
 from django.utils.text import slugify
 from django.utils.translation import ugettext_lazy as _
-from django.core.urlresolvers import reverse_lazy
+from django.urls import reverse_lazy
 from django import forms
 from django.conf import settings
 
diff --git a/combo/apps/pwa/__init__.py b/combo/apps/pwa/__init__.py
index df72c2e0..0e68baa6 100644
--- a/combo/apps/pwa/__init__.py
+++ b/combo/apps/pwa/__init__.py
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import django.apps
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils.translation import ugettext_lazy as _
 
 
diff --git a/combo/apps/pwa/manager_views.py b/combo/apps/pwa/manager_views.py
index f6b71e23..778b4935 100644
--- a/combo/apps/pwa/manager_views.py
+++ b/combo/apps/pwa/manager_views.py
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-from django.core.urlresolvers import reverse_lazy
+from django.urls import reverse_lazy
 from django.db.models import Max
 from django import forms
 from django.http import JsonResponse
diff --git a/combo/apps/search/__init__.py b/combo/apps/search/__init__.py
index 8cffe199..c59fee21 100644
--- a/combo/apps/search/__init__.py
+++ b/combo/apps/search/__init__.py
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import django.apps
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils.translation import ugettext_lazy as _
 
 from .engines import engines
diff --git a/combo/apps/wcs/__init__.py b/combo/apps/wcs/__init__.py
index 3e3c2c54..26e95f89 100644
--- a/combo/apps/wcs/__init__.py
+++ b/combo/apps/wcs/__init__.py
@@ -18,7 +18,7 @@ import hashlib
 
 import django.apps
 from django.conf import settings
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils.encoding import force_bytes
 from django.utils.translation import ugettext_lazy as _, pgettext_lazy
 
diff --git a/combo/apps/wcs/views.py b/combo/apps/wcs/views.py
index e2530d5b..bceb5eea 100644
--- a/combo/apps/wcs/views.py
+++ b/combo/apps/wcs/views.py
@@ -19,7 +19,7 @@ import re
 from django.contrib import messages
 from django.conf import settings
 from django.core.exceptions import DisallowedRedirect, PermissionDenied
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.http import JsonResponse, HttpResponseRedirect, HttpResponseBadRequest
 from django.utils.http import urlquote
 from django.utils.six.moves.urllib import parse as urlparse
diff --git a/combo/manager/templatetags/cells.py b/combo/manager/templatetags/cells.py
index c0ab3000..ef5cdaf1 100644
--- a/combo/manager/templatetags/cells.py
+++ b/combo/manager/templatetags/cells.py
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from django import template
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 register = template.Library()
 
diff --git a/combo/manager/views.py b/combo/manager/views.py
index 7d9fb3ab..49cdbfb3 100644
--- a/combo/manager/views.py
+++ b/combo/manager/views.py
@@ -22,7 +22,7 @@ from operator import attrgetter
 from django.conf import settings
 from django.contrib import messages
 from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
-from django.core.urlresolvers import reverse, reverse_lazy
+from django.urls import reverse, reverse_lazy
 from django.http import HttpResponse, HttpResponseRedirect, Http404
 from django.shortcuts import redirect
 from django.shortcuts import render
diff --git a/combo/monkeypatch.py b/combo/monkeypatch.py
index 1957a7ae..79315c9a 100644
--- a/combo/monkeypatch.py
+++ b/combo/monkeypatch.py
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.forms.utils import flatatt
 from django.template.loader import render_to_string
 from django.utils.encoding import force_text
diff --git a/combo/public/admin.py b/combo/public/admin.py
index a669dd9d..2b7558b4 100644
--- a/combo/public/admin.py
+++ b/combo/public/admin.py
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from django.contrib import admin
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.shortcuts import redirect
 from django.urls.exceptions import NoReverseMatch
 from django.views.decorators.cache import never_cache
diff --git a/combo/urls_utils.py b/combo/urls_utils.py
index fecf7708..42f83a6a 100644
--- a/combo/urls_utils.py
+++ b/combo/urls_utils.py
@@ -18,7 +18,7 @@
 
 from django.contrib.auth.decorators import user_passes_test
 from django.core.exceptions import PermissionDenied
-from django.core.urlresolvers import RegexURLPattern, RegexURLResolver
+from django.urls import RegexURLPattern, RegexURLResolver
 
 class DecoratedURLPattern(RegexURLPattern):
     def resolve(self, *args, **kwargs):
diff --git a/tests/test_assets.py b/tests/test_assets.py
index 2cc051d9..584ecc73 100644
--- a/tests/test_assets.py
+++ b/tests/test_assets.py
@@ -2,7 +2,7 @@
 
 import base64
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 import pytest
 
diff --git a/tests/test_calendar.py b/tests/test_calendar.py
index 02de952b..e71c53e9 100644
--- a/tests/test_calendar.py
+++ b/tests/test_calendar.py
@@ -6,7 +6,7 @@ import mock
 
 from django.contrib.auth.models import User
 from django.core.cache import cache
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils.six.moves.urllib import parse as urlparse
 
 from combo.data.models import Page
diff --git a/tests/test_cells.py b/tests/test_cells.py
index ac017ec1..acf9a922 100644
--- a/tests/test_cells.py
+++ b/tests/test_cells.py
@@ -18,7 +18,7 @@ from django.test import override_settings
 from django.test.client import RequestFactory
 from django.test.utils import CaptureQueriesContext
 from django.contrib.auth.models import User
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils.encoding import force_text, force_bytes
 from django.utils.timezone import now
 
diff --git a/tests/test_dashboard.py b/tests/test_dashboard.py
index 34aaba8f..da4e8578 100644
--- a/tests/test_dashboard.py
+++ b/tests/test_dashboard.py
@@ -9,7 +9,7 @@ from django.apps import apps
 from django.conf import settings
 from django.contrib.auth.models import User
 from django.core.management import call_command
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils.six.moves.urllib import parse as urlparse
 from django.test import override_settings
 
diff --git a/tests/test_gallery_cell.py b/tests/test_gallery_cell.py
index 54143bc0..b8723a06 100644
--- a/tests/test_gallery_cell.py
+++ b/tests/test_gallery_cell.py
@@ -2,7 +2,7 @@
 import os
 import pytest
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from combo.data.models import Page
 from combo.apps.gallery.models import GalleryCell, Image
 
diff --git a/tests/test_lingo_payment.py b/tests/test_lingo_payment.py
index 4d3141ba..afe39215 100644
--- a/tests/test_lingo_payment.py
+++ b/tests/test_lingo_payment.py
@@ -9,7 +9,7 @@ import mock
 
 from django.apps import apps
 from django.contrib.auth.models import User
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.core.wsgi import get_wsgi_application
 from django.conf import settings
 from django.test import override_settings
diff --git a/tests/test_lingo_remote_regie.py b/tests/test_lingo_remote_regie.py
index 636149d4..b68d8fe6 100644
--- a/tests/test_lingo_remote_regie.py
+++ b/tests/test_lingo_remote_regie.py
@@ -10,7 +10,7 @@ from requests.exceptions import ConnectionError
 from django.apps import apps
 from django.test.client import RequestFactory
 from django.test import override_settings
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.conf import settings
 from django.core.management import call_command
 from django.utils.encoding import force_text
diff --git a/tests/test_manager.py b/tests/test_manager.py
index 20ea9219..cf3a27d9 100644
--- a/tests/test_manager.py
+++ b/tests/test_manager.py
@@ -7,7 +7,7 @@ import shutil
 import mock
 
 from django.core.files.storage import default_storage
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.conf import settings
 from django.contrib.auth.models import User, Group
 from django.db import connection
diff --git a/tests/test_maps_cells.py b/tests/test_maps_cells.py
index 2d06c1c3..16b49492 100644
--- a/tests/test_maps_cells.py
+++ b/tests/test_maps_cells.py
@@ -6,7 +6,7 @@ import pytest
 from django.conf import settings
 from django.contrib.auth.models import User
 from django.contrib.auth.models import Group
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.test.client import RequestFactory
 from django.utils.html import escape
 
diff --git a/tests/test_notification.py b/tests/test_notification.py
index 0369d812..d56198cd 100644
--- a/tests/test_notification.py
+++ b/tests/test_notification.py
@@ -9,7 +9,7 @@ from django.contrib.auth.models import User
 from django.test.client import RequestFactory
 from django.utils.encoding import force_text
 from django.utils.timezone import timedelta, now
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 from django.test import Client
 
diff --git a/tests/test_public.py b/tests/test_public.py
index ea4c5605..5a41f127 100644
--- a/tests/test_public.py
+++ b/tests/test_public.py
@@ -9,7 +9,7 @@ import os
 
 from django.conf import settings
 from django.contrib.auth.models import User, Group
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.db import connection
 from django.utils.http import quote
 from django.utils import six
diff --git a/tests/test_pwa.py b/tests/test_pwa.py
index 4af14f9c..35baabcb 100644
--- a/tests/test_pwa.py
+++ b/tests/test_pwa.py
@@ -9,7 +9,7 @@ import pywebpush
 
 from django.conf import settings
 from django.core.files import File
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.template import Context, Template
 from django.test import override_settings
 from django.test.client import RequestFactory
diff --git a/tests/test_search.py b/tests/test_search.py
index 6ac7426c..fe251b69 100644
--- a/tests/test_search.py
+++ b/tests/test_search.py
@@ -12,7 +12,7 @@ from django.test import override_settings
 from django.test.client import RequestFactory
 from django.test.utils import CaptureQueriesContext
 from django.core.management import call_command
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 from combo.apps.search.engines import engines
 from combo.apps.search.models import SearchCell, IndexedCell
diff --git a/tests/test_wcs.py b/tests/test_wcs.py
index 13aea631..1a62db3d 100644
--- a/tests/test_wcs.py
+++ b/tests/test_wcs.py
@@ -15,7 +15,7 @@ import os
 from django.apps import apps
 from django.conf import settings
 from django.core.cache import cache
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.db import connection
 from django.test import override_settings
 from django.test.client import RequestFactory
-- 
2.26.0

