From d2eec6e273f1e1e754b184542e8e5d3859706962 Mon Sep 17 00:00:00 2001 From: manchandavishal Date: Fri, 29 Apr 2022 15:45:39 +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: I98bcf28d6a82af7f08978fdecb7f5dc7d02e3972 --- vitrage_dashboard/admin_alarms/urls.py | 4 ++-- vitrage_dashboard/admin_dashboard/urls.py | 4 ++-- vitrage_dashboard/admin_entities/urls.py | 4 ++-- vitrage_dashboard/admin_templates/urls.py | 4 ++-- vitrage_dashboard/alarms/urls.py | 4 ++-- vitrage_dashboard/dashboard/urls.py | 4 ++-- vitrage_dashboard/entities/urls.py | 4 ++-- vitrage_dashboard/templates/urls.py | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/vitrage_dashboard/admin_alarms/urls.py b/vitrage_dashboard/admin_alarms/urls.py index 660722f..3fc5768 100644 --- a/vitrage_dashboard/admin_alarms/urls.py +++ b/vitrage_dashboard/admin_alarms/urls.py @@ -12,10 +12,10 @@ # 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 from vitrage_dashboard.admin_alarms import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/vitrage_dashboard/admin_dashboard/urls.py b/vitrage_dashboard/admin_dashboard/urls.py index 08ac6be..d148dda 100644 --- a/vitrage_dashboard/admin_dashboard/urls.py +++ b/vitrage_dashboard/admin_dashboard/urls.py @@ -12,11 +12,11 @@ # 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 from vitrage_dashboard.admin_dashboard import views import vitrage_dashboard.api.vitrage_rest_api # noqa urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/vitrage_dashboard/admin_entities/urls.py b/vitrage_dashboard/admin_entities/urls.py index 965c402..89b7552 100644 --- a/vitrage_dashboard/admin_entities/urls.py +++ b/vitrage_dashboard/admin_entities/urls.py @@ -12,10 +12,10 @@ # 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 from vitrage_dashboard.admin_entities import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/vitrage_dashboard/admin_templates/urls.py b/vitrage_dashboard/admin_templates/urls.py index 580376b..89c8336 100644 --- a/vitrage_dashboard/admin_templates/urls.py +++ b/vitrage_dashboard/admin_templates/urls.py @@ -12,10 +12,10 @@ # 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 from vitrage_dashboard.admin_templates import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/vitrage_dashboard/alarms/urls.py b/vitrage_dashboard/alarms/urls.py index 5ddea74..8cc51d7 100644 --- a/vitrage_dashboard/alarms/urls.py +++ b/vitrage_dashboard/alarms/urls.py @@ -12,10 +12,10 @@ # 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 from vitrage_dashboard.alarms import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/vitrage_dashboard/dashboard/urls.py b/vitrage_dashboard/dashboard/urls.py index 60f3012..dc1a510 100644 --- a/vitrage_dashboard/dashboard/urls.py +++ b/vitrage_dashboard/dashboard/urls.py @@ -12,11 +12,11 @@ # 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 vitrage_dashboard.api.vitrage_rest_api # noqa from vitrage_dashboard.dashboard import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/vitrage_dashboard/entities/urls.py b/vitrage_dashboard/entities/urls.py index 71c47e6..e8d2002 100644 --- a/vitrage_dashboard/entities/urls.py +++ b/vitrage_dashboard/entities/urls.py @@ -12,10 +12,10 @@ # 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 from vitrage_dashboard.entities import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/vitrage_dashboard/templates/urls.py b/vitrage_dashboard/templates/urls.py index 1130a5a..9312ec6 100644 --- a/vitrage_dashboard/templates/urls.py +++ b/vitrage_dashboard/templates/urls.py @@ -12,10 +12,10 @@ # 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 from vitrage_dashboard.templates import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ]