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: I738008187eb5ceae633f42eb0cedc774017ab79d
This commit is contained in:
manchandavishal 2022-04-29 17:12:01 +05:30
parent f85d70c05f
commit bdc00ef34b
5 changed files with 14 additions and 14 deletions

View File

@ -10,11 +10,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 django.utils.translation import ugettext_lazy as _
from horizon.browsers import views
title = _("Capsules")
urlpatterns = [
url('', views.AngularIndexView.as_view(title=title), name='index'),
re_path('', views.AngularIndexView.as_view(title=title), name='index'),
]

View File

@ -10,14 +10,14 @@
# 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 django.utils.translation import ugettext_lazy as _
from horizon.browsers import views
from zun_ui.content.container.containers import views as zun_views
title = _("Containers")
urlpatterns = [
url(r'^(?P<container_id>[^/]+)/console',
zun_views.SerialConsoleView.as_view(), name='console'),
url('', views.AngularIndexView.as_view(title=title), name='index'),
re_path(r'^(?P<container_id>[^/]+)/console',
zun_views.SerialConsoleView.as_view(), name='console'),
re_path('', views.AngularIndexView.as_view(title=title), name='index'),
]

View File

@ -10,14 +10,14 @@
# 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 django.utils.translation import ugettext_lazy as _
from horizon.browsers import views
from zun_ui.content.container.containers import views as zun_views
title = _("Containers")
urlpatterns = [
url(r'^(?P<container_id>[^/]+)/console',
zun_views.SerialConsoleView.as_view(), name='console'),
url('', views.AngularIndexView.as_view(title=title), name='index'),
re_path(r'^(?P<container_id>[^/]+)/console',
zun_views.SerialConsoleView.as_view(), name='console'),
re_path('', views.AngularIndexView.as_view(title=title), name='index'),
]

View File

@ -10,11 +10,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 django.utils.translation import ugettext_lazy as _
from horizon.browsers import views
title = _("Hosts")
urlpatterns = [
url('', views.AngularIndexView.as_view(title=title), name='index'),
re_path('', views.AngularIndexView.as_view(title=title), name='index'),
]

View File

@ -10,11 +10,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 django.utils.translation import ugettext_lazy as _
from horizon.browsers import views
title = _("Images")
urlpatterns = [
url('', views.AngularIndexView.as_view(title=title), name='index'),
re_path('', views.AngularIndexView.as_view(title=title), name='index'),
]