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
This commit is contained in:
manchandavishal 2022-04-29 21:55:18 +05:30
parent 74a0b9c495
commit 16c4d0a63c
2 changed files with 5 additions and 5 deletions

View File

@ -14,12 +14,12 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from django.conf.urls import url from django.urls import re_path
import ironic_ui.api.ironic_rest_api # noqa import ironic_ui.api.ironic_rest_api # noqa
from ironic_ui.content.ironic import views from ironic_ui.content.ironic import views
urlpatterns = [ urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'), re_path(r'^$', views.IndexView.as_view(), name='index'),
url(r'^([^/]+)/$', views.DetailView.as_view(), name='detail'), re_path(r'^([^/]+)/$', views.DetailView.as_view(), name='detail'),
] ]

View File

@ -12,9 +12,9 @@
# under the License. # under the License.
from django.conf.urls import include from django.conf.urls import include
from django.conf.urls import url from django.urls import re_path
import openstack_dashboard.urls import openstack_dashboard.urls
urlpatterns = [ urlpatterns = [
url(r'', include(openstack_dashboard.urls)) re_path(r'', include(openstack_dashboard.urls))
] ]