From 16c4d0a63c22c5f7189967cfb55341811bcdc44e Mon Sep 17 00:00:00 2001 From: manchandavishal Date: Fri, 29 Apr 2022 21:55:18 +0530 Subject: [PATCH] Address RemovedInDjango40Warning In Django 3.1, django.conf.urls.url() is deprecated in favor of django.urls.re_path(). For more info see [1] These were already replaced in Horizon repo by [2]. [1] https://docs.djangoproject.com/en/4.0/releases/3.1/#id2 [2] https://review.opendev.org/c/openstack/horizon/+/827093 Change-Id: I4d64f8ecd2fd665dd4133603dce078e043d00177 --- ironic_ui/content/ironic/urls.py | 6 +++--- ironic_ui/test/urls.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ironic_ui/content/ironic/urls.py b/ironic_ui/content/ironic/urls.py index a0143273..4ff85a3a 100644 --- a/ironic_ui/content/ironic/urls.py +++ b/ironic_ui/content/ironic/urls.py @@ -14,12 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -from django.conf.urls import url +from django.urls import re_path import ironic_ui.api.ironic_rest_api # noqa from ironic_ui.content.ironic import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^([^/]+)/$', views.DetailView.as_view(), name='detail'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^([^/]+)/$', views.DetailView.as_view(), name='detail'), ] diff --git a/ironic_ui/test/urls.py b/ironic_ui/test/urls.py index 3c2ffc23..20342d96 100644 --- a/ironic_ui/test/urls.py +++ b/ironic_ui/test/urls.py @@ -12,9 +12,9 @@ # under the License. from django.conf.urls import include -from django.conf.urls import url +from django.urls import re_path import openstack_dashboard.urls urlpatterns = [ - url(r'', include(openstack_dashboard.urls)) + re_path(r'', include(openstack_dashboard.urls)) ]