From 2fddf5d41dc186f63abb743169cba74b3683c3ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Laur=C3=A9line=20Gu=C3=A9rin?= <zebuline@entrouvert.com>
Date: Thu, 10 Dec 2020 15:03:57 +0100
Subject: [PATCH 01/10] django22: import django.urls (#49188)

---
 passerelle/apps/api_entreprise/models.py | 2 +-
 passerelle/apps/arcgis/models.py         | 2 +-
 passerelle/apps/bdp/models.py            | 2 +-
 passerelle/apps/cartads_cs/models.py     | 2 +-
 passerelle/apps/clicrdv/models.py        | 2 +-
 passerelle/apps/mdel_ddpacs/abstract.py  | 2 +-
 passerelle/apps/opendatasoft/models.py   | 2 +-
 passerelle/apps/sp_fr/models.py          | 2 +-
 passerelle/base/models.py                | 2 +-
 passerelle/base/views.py                 | 2 +-
 passerelle/contrib/fake_family/models.py | 2 +-
 passerelle/contrib/solis_apa/models.py   | 2 +-
 passerelle/urls_utils.py                 | 2 +-
 passerelle/utils/api.py                  | 2 +-
 passerelle/views.py                      | 2 +-
 tests/test_api_access.py                 | 2 +-
 tests/test_api_particulier.py            | 2 +-
 tests/test_arcgis_nancy.py               | 2 +-
 tests/test_arpege_ecp.py                 | 2 +-
 tests/test_cmis.py                       | 2 +-
 tests/test_csv_datasource.py             | 2 +-
 tests/test_fake_family.py                | 2 +-
 tests/test_family.py                     | 2 +-
 tests/test_generic_endpoint.py           | 2 +-
 tests/test_greco.py                      | 2 +-
 tests/test_grenoble_gru.py               | 2 +-
 tests/test_import_export.py              | 2 +-
 tests/test_iparapheur.py                 | 2 +-
 tests/test_lille_kimoce.py               | 2 +-
 tests/test_misc.py                       | 2 +-
 tests/test_nancypoll.py                  | 2 +-
 tests/test_sms.py                        | 2 +-
 tests/test_solis_apa.py                  | 2 +-
 tests/utils.py                           | 2 +-
 34 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/passerelle/apps/api_entreprise/models.py b/passerelle/apps/api_entreprise/models.py
index 0232ef41..e04ce25a 100644
--- a/passerelle/apps/api_entreprise/models.py
+++ b/passerelle/apps/api_entreprise/models.py
@@ -27,7 +27,7 @@ from django.utils.translation import ugettext_lazy as _
 from django.utils.timezone import datetime, make_aware, timedelta
 from django.http import HttpResponse, Http404
 from django.core import signing
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 from passerelle.base.models import BaseResource
 from passerelle.utils.api import endpoint
diff --git a/passerelle/apps/arcgis/models.py b/passerelle/apps/arcgis/models.py
index 5761bc53..4da404af 100644
--- a/passerelle/apps/arcgis/models.py
+++ b/passerelle/apps/arcgis/models.py
@@ -17,7 +17,7 @@
 import string
 
 from django.core.exceptions import ValidationError
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.db import models
 from django.http import HttpResponse
 from django.shortcuts import get_object_or_404
diff --git a/passerelle/apps/bdp/models.py b/passerelle/apps/bdp/models.py
index 4aa467ed..e724bb61 100644
--- a/passerelle/apps/bdp/models.py
+++ b/passerelle/apps/bdp/models.py
@@ -2,7 +2,7 @@ import json
 import requests
 from requests.auth import HTTPBasicAuth
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.db import models
 from django.utils.translation import ugettext_lazy as _
 
diff --git a/passerelle/apps/cartads_cs/models.py b/passerelle/apps/cartads_cs/models.py
index 4f53a489..e90c9129 100644
--- a/passerelle/apps/cartads_cs/models.py
+++ b/passerelle/apps/cartads_cs/models.py
@@ -34,7 +34,7 @@ from django.conf import settings
 from django.contrib.postgres.fields import JSONField
 from django.core.files.storage import default_storage
 from django.core.signing import Signer
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.db import models
 from django.http import HttpResponse
 from django.utils.encoding import force_text
diff --git a/passerelle/apps/clicrdv/models.py b/passerelle/apps/clicrdv/models.py
index 721e12fd..5870c99b 100644
--- a/passerelle/apps/clicrdv/models.py
+++ b/passerelle/apps/clicrdv/models.py
@@ -10,7 +10,7 @@ import json
 import requests
 
 from django.conf import settings
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.db import models
 from django.utils.dateformat import format as date_format
 from django.utils.dateformat import time_format
diff --git a/passerelle/apps/mdel_ddpacs/abstract.py b/passerelle/apps/mdel_ddpacs/abstract.py
index ab3fd30d..9f1629b5 100644
--- a/passerelle/apps/mdel_ddpacs/abstract.py
+++ b/passerelle/apps/mdel_ddpacs/abstract.py
@@ -26,7 +26,7 @@ import zipfile
 
 from django.contrib.postgres.fields import JSONField
 from django.db import models, IntegrityError, transaction
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.http import HttpResponse
 from django.utils.translation import ugettext_lazy as _
 from django.utils import six, functional
diff --git a/passerelle/apps/opendatasoft/models.py b/passerelle/apps/opendatasoft/models.py
index a3105bb0..6d6cc3ab 100644
--- a/passerelle/apps/opendatasoft/models.py
+++ b/passerelle/apps/opendatasoft/models.py
@@ -17,7 +17,7 @@
 from django.db import models
 from django.shortcuts import get_object_or_404
 from django.template import Context, Template
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils.encoding import force_text
 from django.utils.six.moves.urllib import parse as urlparse
 from django.utils.translation import ugettext_lazy as _
diff --git a/passerelle/apps/sp_fr/models.py b/passerelle/apps/sp_fr/models.py
index 594e2359..b0491c33 100644
--- a/passerelle/apps/sp_fr/models.py
+++ b/passerelle/apps/sp_fr/models.py
@@ -26,7 +26,7 @@ import datetime
 from lxml import etree as ET
 
 from django.contrib.postgres.fields import JSONField
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.core.files import File
 from django.db import models, transaction
 from django.template import engines
diff --git a/passerelle/base/models.py b/passerelle/base/models.py
index 014fbc83..ae510be2 100644
--- a/passerelle/base/models.py
+++ b/passerelle/base/models.py
@@ -15,7 +15,7 @@ from django.apps import apps
 from django.conf import settings
 from django.contrib.postgres.fields import JSONField
 from django.core.exceptions import ValidationError, PermissionDenied
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.db import connection, models, transaction
 from django.db.models import Q
 from django.forms.models import modelform_factory
diff --git a/passerelle/base/views.py b/passerelle/base/views.py
index a8dc03d6..04f40dd5 100644
--- a/passerelle/base/views.py
+++ b/passerelle/base/views.py
@@ -21,7 +21,7 @@ from dateutil import parser as date_parser
 
 from django.conf import settings
 from django.contrib.contenttypes.models import ContentType
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
 from django.db.models import Q
 from django.forms import models as model_forms
diff --git a/passerelle/contrib/fake_family/models.py b/passerelle/contrib/fake_family/models.py
index c0823c90..8b435ece 100644
--- a/passerelle/contrib/fake_family/models.py
+++ b/passerelle/contrib/fake_family/models.py
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from django.contrib.postgres.fields import JSONField
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils.translation import ugettext_lazy as _
 from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
 
diff --git a/passerelle/contrib/solis_apa/models.py b/passerelle/contrib/solis_apa/models.py
index f9ac23f1..9618b87d 100644
--- a/passerelle/contrib/solis_apa/models.py
+++ b/passerelle/contrib/solis_apa/models.py
@@ -19,7 +19,7 @@ import json
 
 from django.db import models
 from django.core.cache import cache
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.db import models
 from django.utils.six.moves.urllib import parse as urlparse
 from django.utils.translation import ugettext_lazy as _
diff --git a/passerelle/urls_utils.py b/passerelle/urls_utils.py
index 19070ba7..e7c1e595 100644
--- a/passerelle/urls_utils.py
+++ b/passerelle/urls_utils.py
@@ -5,7 +5,7 @@ from functools import wraps
 from django.conf import settings
 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
 from django.views.debug import technical_404_response
 from django.http import Http404
 
diff --git a/passerelle/utils/api.py b/passerelle/utils/api.py
index 034bf4d7..94434a06 100644
--- a/passerelle/utils/api.py
+++ b/passerelle/utils/api.py
@@ -18,7 +18,7 @@ from __future__ import absolute_import
 
 import inspect
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils import six
 from django.utils.safestring import mark_safe
 
diff --git a/passerelle/views.py b/passerelle/views.py
index c4955d9c..0199bf13 100644
--- a/passerelle/views.py
+++ b/passerelle/views.py
@@ -37,7 +37,7 @@ from django.views.generic import (
 from django.views.generic.detail import SingleObjectMixin
 from django.conf import settings
 from django.shortcuts import resolve_url
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils.timezone import make_aware
 from django.utils.translation import ugettext_lazy as _
 from django.utils.encoding import force_bytes, force_text
diff --git a/tests/test_api_access.py b/tests/test_api_access.py
index a789b353..2539c973 100644
--- a/tests/test_api_access.py
+++ b/tests/test_api_access.py
@@ -3,7 +3,7 @@ import sys
 
 from django.contrib.auth.models import User
 from django.contrib.contenttypes.models import ContentType
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 import pytest
 import utils
diff --git a/tests/test_api_particulier.py b/tests/test_api_particulier.py
index 9535a18d..3b05e3c8 100644
--- a/tests/test_api_particulier.py
+++ b/tests/test_api_particulier.py
@@ -20,7 +20,7 @@ import logging
 import pytest
 from httmock import urlmatch, HTTMock, response
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 import requests
 
diff --git a/tests/test_arcgis_nancy.py b/tests/test_arcgis_nancy.py
index 3c2ba694..0ce19b31 100644
--- a/tests/test_arcgis_nancy.py
+++ b/tests/test_arcgis_nancy.py
@@ -4,7 +4,7 @@ import pytest
 import mock
 
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.contrib.contenttypes.models import ContentType
 
 from passerelle.apps.arcgis.models import ArcGIS
diff --git a/tests/test_arpege_ecp.py b/tests/test_arpege_ecp.py
index f541d652..d35fb3fb 100644
--- a/tests/test_arpege_ecp.py
+++ b/tests/test_arpege_ecp.py
@@ -4,7 +4,7 @@ import json
 import mock
 import pytest
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 from passerelle.apps.arpege_ecp.models import ArpegeECP
 from passerelle.utils.jsonresponse import APIError
diff --git a/tests/test_cmis.py b/tests/test_cmis.py
index 157cc06e..05be07b6 100644
--- a/tests/test_cmis.py
+++ b/tests/test_cmis.py
@@ -12,7 +12,7 @@ from cmislib.exceptions import PermissionDeniedException
 from cmislib.exceptions import UpdateConflictException
 from cmislib.exceptions import InvalidArgumentException
 from django.contrib.contenttypes.models import ContentType
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils.encoding import force_bytes, force_text
 from django.utils.six.moves.urllib import error as urllib2
 from mock import call, Mock
diff --git a/tests/test_csv_datasource.py b/tests/test_csv_datasource.py
index 366a65ed..976b3d6c 100644
--- a/tests/test_csv_datasource.py
+++ b/tests/test_csv_datasource.py
@@ -27,7 +27,7 @@ from posix import stat_result
 from stat import ST_MTIME
 
 from django.core.files import File
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.contrib.contenttypes.models import ContentType
 from django.test import Client, override_settings
 from django.core.management import call_command
diff --git a/tests/test_fake_family.py b/tests/test_fake_family.py
index f45ae79c..e4ce431e 100644
--- a/tests/test_fake_family.py
+++ b/tests/test_fake_family.py
@@ -2,7 +2,7 @@
 
 import json
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 import pytest
 from passerelle.contrib.fake_family.models import FakeFamily
diff --git a/tests/test_family.py b/tests/test_family.py
index 17063d6f..7476f0d6 100644
--- a/tests/test_family.py
+++ b/tests/test_family.py
@@ -9,7 +9,7 @@ import shutil
 
 from django.core.exceptions import ValidationError
 from django.core.files import File
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils import timezone
 from django.utils.http import urlencode
 from django.core.files import File
diff --git a/tests/test_generic_endpoint.py b/tests/test_generic_endpoint.py
index 63065965..55213b79 100644
--- a/tests/test_generic_endpoint.py
+++ b/tests/test_generic_endpoint.py
@@ -29,7 +29,7 @@ import pytest
 import utils
 
 from django.contrib.contenttypes.models import ContentType
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 from passerelle.apps.arcgis.models import ArcGIS
 from passerelle.apps.api_particulier.models import APIParticulier
diff --git a/tests/test_greco.py b/tests/test_greco.py
index f1da3ec0..45d32386 100644
--- a/tests/test_greco.py
+++ b/tests/test_greco.py
@@ -4,7 +4,7 @@ import mock
 from requests import Response
 import utils
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.contrib.contenttypes.models import ContentType
 
 from passerelle.base.models import ApiUser, AccessRight
diff --git a/tests/test_grenoble_gru.py b/tests/test_grenoble_gru.py
index 05a1dfed..8378a5e2 100644
--- a/tests/test_grenoble_gru.py
+++ b/tests/test_grenoble_gru.py
@@ -23,7 +23,7 @@ import six
 
 import utils
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 from passerelle.contrib.grenoble_gru.models import GrenobleGRU
 
diff --git a/tests/test_import_export.py b/tests/test_import_export.py
index 20dfdf76..af609d76 100644
--- a/tests/test_import_export.py
+++ b/tests/test_import_export.py
@@ -6,7 +6,7 @@ import pytest
 import tempfile
 
 from django.core.files import File
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.core.management import call_command
 from django.contrib.contenttypes.models import ContentType
 from django.test import Client
diff --git a/tests/test_iparapheur.py b/tests/test_iparapheur.py
index 7a9a9a91..ffd63749 100644
--- a/tests/test_iparapheur.py
+++ b/tests/test_iparapheur.py
@@ -10,7 +10,7 @@ from dateutil import parser
 from requests import Response
 
 from requests.exceptions import ConnectionError
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.contrib.contenttypes.models import ContentType
 from django.utils import timezone
 from django.utils.encoding import force_bytes
diff --git a/tests/test_lille_kimoce.py b/tests/test_lille_kimoce.py
index 88b389e0..79e8efa4 100644
--- a/tests/test_lille_kimoce.py
+++ b/tests/test_lille_kimoce.py
@@ -23,7 +23,7 @@ import pytest
 
 import utils
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 from passerelle.contrib.lille_kimoce.models import Kimoce
 from passerelle.utils.jsonresponse import APIError
diff --git a/tests/test_misc.py b/tests/test_misc.py
index 66a4e82c..339be2a3 100644
--- a/tests/test_misc.py
+++ b/tests/test_misc.py
@@ -6,7 +6,7 @@ from django.contrib.contenttypes.models import ContentType
 from django.core.files import File
 from django.db import connection
 from django.db.migrations.executor import MigrationExecutor
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils import timezone
 from django.utils.six import StringIO
 
diff --git a/tests/test_nancypoll.py b/tests/test_nancypoll.py
index 41fa4ed6..7b7d8468 100644
--- a/tests/test_nancypoll.py
+++ b/tests/test_nancypoll.py
@@ -1,7 +1,7 @@
 import pytest
 
 from django.core.files import File
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.contrib.contenttypes.models import ContentType
 from django.test import Client
 from django.utils.six import StringIO
diff --git a/tests/test_sms.py b/tests/test_sms.py
index 583408c9..9aae87a6 100644
--- a/tests/test_sms.py
+++ b/tests/test_sms.py
@@ -6,7 +6,7 @@ from requests import RequestException
 
 from django.conf import settings
 from django.contrib.contenttypes.models import ContentType
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 
 from passerelle.apps.ovh.models import OVHSMSGateway
 from passerelle.base.models import ApiUser, AccessRight, Job
diff --git a/tests/test_solis_apa.py b/tests/test_solis_apa.py
index 5a05a2db..e021f9f6 100644
--- a/tests/test_solis_apa.py
+++ b/tests/test_solis_apa.py
@@ -6,7 +6,7 @@ from decimal import Decimal
 import mock
 import pytest
 
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.contrib.contenttypes.models import ContentType
 
 from passerelle.base.models import ApiUser, AccessRight
diff --git a/tests/utils.py b/tests/utils.py
index a8a46fd1..503ab426 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -4,7 +4,7 @@ import mock
 import httmock
 
 from django.contrib.contenttypes.models import ContentType
-from django.core.urlresolvers import reverse
+from django.urls import reverse
 from django.utils.six.moves.urllib import parse as urlparse
 
 from passerelle.base.models import ApiUser, AccessRight
-- 
2.28.0

