From 96c18c8cf5115a8b532007bd33d09c99bfcb4091 Mon Sep 17 00:00:00 2001 From: manchandavishal Date: Fri, 29 Apr 2022 21:57:21 +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: I90d44f7e8b3b0067c67dcdf9fbaf57b94e627d3c --- octavia_dashboard/dashboards/project/load_balancer/urls.py | 4 ++-- octavia_dashboard/tests/urls.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/octavia_dashboard/dashboards/project/load_balancer/urls.py b/octavia_dashboard/dashboards/project/load_balancer/urls.py index bbae102b..33904fa5 100644 --- a/octavia_dashboard/dashboards/project/load_balancer/urls.py +++ b/octavia_dashboard/dashboards/project/load_balancer/urls.py @@ -12,11 +12,11 @@ # License for the specific language governing permissions and limitations # under the License. -from django.conf.urls import url +from django.urls import re_path from octavia_dashboard.dashboards.project.load_balancer import views urlpatterns = [ - url('', views.IndexView.as_view(), name='index'), + re_path('', views.IndexView.as_view(), name='index'), ] diff --git a/octavia_dashboard/tests/urls.py b/octavia_dashboard/tests/urls.py index 4924dbad..71c62370 100644 --- a/octavia_dashboard/tests/urls.py +++ b/octavia_dashboard/tests/urls.py @@ -13,9 +13,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)) ]