diff options
author | Akihiro Motoki <amotoki@gmail.com> | 2022-01-27 00:07:02 +0900 |
---|---|---|
committer | Akihiro Motoki <amotoki@gmail.com> | 2022-02-04 16:26:54 +0900 |
commit | d9266fd82c1f0acc6b7236a6dc9b7e510985eb13 (patch) | |
tree | 0c9db80e2dbce71dc5c3b81bc50511216d8a75b9 | |
parent | cd7c1b5110fe1f64cd9dfbeb1072b37912d0efee (diff) | |
download | horizon-d9266fd82c1f0acc6b7236a6dc9b7e510985eb13.tar.gz |
Address RemovedInDjango40Warning (3)
In Django 3.1, django.conf.urls.url() is deprecated
in favor of django.urls.re_path().
https://docs.djangoproject.com/en/4.0/releases/3.1/#id2
Change-Id: I484694f8718f61c022126a1935cf28fce075894b
89 files changed, 725 insertions, 710 deletions
diff --git a/doc/source/contributor/tutorials/dashboard.rst b/doc/source/contributor/tutorials/dashboard.rst index 8231add4c..f7a6692a2 100644 --- a/doc/source/contributor/tutorials/dashboard.rst +++ b/doc/source/contributor/tutorials/dashboard.rst @@ -458,13 +458,13 @@ URLs ---- The auto-generated ``urls.py`` file is like:: - from django.conf.urls import url + from django.urls import re_path from openstack_dashboard.dashboards.mydashboard.mypanel import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/doc/source/contributor/tutorials/plugin.rst b/doc/source/contributor/tutorials/plugin.rst index 9fcd62822..13b80c1f6 100644 --- a/doc/source/contributor/tutorials/plugin.rst +++ b/doc/source/contributor/tutorials/plugin.rst @@ -209,12 +209,12 @@ urls.py Now that we have a panel, we need to provide a URL so that users can visit our new panel! This URL generally will point to a view.:: - from django.conf.urls import url + from django.urls import re_path from myplugin.content.mypanel import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] views.py diff --git a/doc/source/contributor/tutorials/table_actions.rst b/doc/source/contributor/tutorials/table_actions.rst index 721bdb349..ebde02c8d 100644 --- a/doc/source/contributor/tutorials/table_actions.rst +++ b/doc/source/contributor/tutorials/table_actions.rst @@ -176,17 +176,17 @@ the ``mypanel`` directory and add the following as a new url pattern:: The complete ``urls.py`` file should look like this:: - from django.conf.urls import url + from django.urls import re_path from openstack_dashboard.dashboards.mydashboard.mypanel import views urlpatterns = [ - url(r'^$', - views.IndexView.as_view(), name='index'), - url(r'^(?P<instance_id>[^/]+)/create_snapshot/$', - views.CreateSnapshotView.as_view(), - name='create_snapshot'), + re_path(r'^$', + views.IndexView.as_view(), name='index'), + re_path(r'^(?P<instance_id>[^/]+)/create_snapshot/$', + views.CreateSnapshotView.as_view(), + name='create_snapshot'), ] diff --git a/horizon/base.py b/horizon/base.py index 8f574834b..463a77300 100644 --- a/horizon/base.py +++ b/horizon/base.py @@ -31,8 +31,8 @@ import os from django.conf import settings from django.conf.urls import include -from django.conf.urls import url from django.core.exceptions import ImproperlyConfigured +from django.urls import re_path from django.urls import reverse from django.utils.functional import empty from django.utils.functional import SimpleLazyObject @@ -550,14 +550,15 @@ class Dashboard(Registry, HorizonComponent): default_panel = panel continue url_slug = panel.slug.replace('.', '/') - urlpatterns.append(url(r'^%s/' % url_slug, - _wrapped_include(panel._decorated_urls))) + urlpatterns.append( + re_path(r'^%s/' % url_slug, + _wrapped_include(panel._decorated_urls))) # Now the default view, which should come last if not default_panel: raise NotRegistered('The default panel "%s" is not registered.' % self.default_panel) urlpatterns.append( - url(r'', _wrapped_include(default_panel._decorated_urls))) + re_path(r'', _wrapped_include(default_panel._decorated_urls))) # Apply access controls to all views in the patterns permissions = getattr(self, 'permissions', []) @@ -871,8 +872,9 @@ class Site(Registry, HorizonComponent): # Compile the dynamic urlconf. for dash in self._registry.values(): - urlpatterns.append(url(r'^%s/' % dash.slug, - _wrapped_include(dash._decorated_urls))) + urlpatterns.append( + re_path(r'^%s/' % dash.slug, + _wrapped_include(dash._decorated_urls))) # Return the three arguments to django.conf.urls.include return urlpatterns, self.namespace, self.slug diff --git a/horizon/conf/panel_template/urls.py.tmpl b/horizon/conf/panel_template/urls.py.tmpl index 6b04c3476..817385bcb 100644 --- a/horizon/conf/panel_template/urls.py.tmpl +++ b/horizon/conf/panel_template/urls.py.tmpl @@ -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 {{ dash_path }}.{{ panel_name }} import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/horizon/site_urls.py b/horizon/site_urls.py index 5028814d1..890d5d6a6 100644 --- a/horizon/site_urls.py +++ b/horizon/site_urls.py @@ -18,7 +18,7 @@ from django.conf import settings from django.conf.urls import include -from django.conf.urls import url +from django.urls import re_path from django.utils import timezone from django.views.decorators.http import last_modified from django.views.generic import TemplateView @@ -28,28 +28,28 @@ from horizon.test.jasmine import jasmine from horizon import views urlpatterns = [ - url(r'^home/$', views.user_home, name='user_home') + re_path(r'^home/$', views.user_home, name='user_home') ] last_modified_date = timezone.now() # Client-side i18n URLconf. urlpatterns.extend([ - url(r'^i18n/js/(?P<packages>\S+?)/$', - last_modified(lambda req, **kw: last_modified_date)( - i18n.JavaScriptCatalog.as_view()), - name='jsi18n'), - url(r'^i18n/setlang/$', - i18n.set_language, - name="set_language"), - url(r'^i18n/', include('django.conf.urls.i18n')) + re_path(r'^i18n/js/(?P<packages>\S+?)/$', + last_modified(lambda req, **kw: last_modified_date)( + i18n.JavaScriptCatalog.as_view()), + name='jsi18n'), + re_path(r'^i18n/setlang/$', + i18n.set_language, + name="set_language"), + re_path(r'^i18n/', include('django.conf.urls.i18n')) ]) if settings.DEBUG: urlpatterns.extend([ - url(r'^jasmine-legacy/$', - TemplateView.as_view( - template_name="horizon/jasmine/jasmine_legacy.html"), - name='jasmine_tests'), - url(r'^jasmine/.*?$', jasmine.dispatcher), + re_path(r'^jasmine-legacy/$', + TemplateView.as_view( + template_name="horizon/jasmine/jasmine_legacy.html"), + name='jasmine_tests'), + re_path(r'^jasmine/.*?$', jasmine.dispatcher), ]) diff --git a/horizon/test/test_dashboards/cats/kittens/urls.py b/horizon/test/test_dashboards/cats/kittens/urls.py index 1a8944c4c..1c8808b80 100644 --- a/horizon/test/test_dashboards/cats/kittens/urls.py +++ b/horizon/test/test_dashboards/cats/kittens/urls.py @@ -10,10 +10,10 @@ # 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 horizon.test.test_dashboards.cats.kittens.views import IndexView urlpatterns = [ - url(r'^$', IndexView.as_view(), name='index'), + re_path(r'^$', IndexView.as_view(), name='index'), ] diff --git a/horizon/test/test_dashboards/cats/tigers/urls.py b/horizon/test/test_dashboards/cats/tigers/urls.py index 3bf05a75d..c85e46b1f 100644 --- a/horizon/test/test_dashboards/cats/tigers/urls.py +++ b/horizon/test/test_dashboards/cats/tigers/urls.py @@ -10,10 +10,10 @@ # 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 horizon.test.test_dashboards.cats.tigers.views import IndexView urlpatterns = [ - url(r'^$', IndexView.as_view(), name='index'), + re_path(r'^$', IndexView.as_view(), name='index'), ] diff --git a/horizon/test/test_dashboards/dogs/puppies/urls.py b/horizon/test/test_dashboards/dogs/puppies/urls.py index 5a4853092..0a74cd6e8 100644 --- a/horizon/test/test_dashboards/dogs/puppies/urls.py +++ b/horizon/test/test_dashboards/dogs/puppies/urls.py @@ -10,12 +10,12 @@ # 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 horizon.test.test_dashboards.dogs.puppies.views import IndexView from horizon.test.test_dashboards.dogs.puppies.views import TwoTabsView urlpatterns = [ - url(r'^$', IndexView.as_view(), name='index'), - url(r'^tabs/$', TwoTabsView.as_view(), name='tabs'), + re_path(r'^$', IndexView.as_view(), name='index'), + re_path(r'^tabs/$', TwoTabsView.as_view(), name='tabs'), ] diff --git a/horizon/test/urls.py b/horizon/test/urls.py index 359a782f3..22e710929 100644 --- a/horizon/test/urls.py +++ b/horizon/test/urls.py @@ -21,9 +21,9 @@ URL patterns for testing Horizon views. """ from django.conf.urls import include -from django.conf.urls import url from django.contrib.auth import views from django.contrib.staticfiles.urls import staticfiles_urlpatterns +from django.urls import re_path from django.views.generic import TemplateView import horizon @@ -32,16 +32,16 @@ from horizon.test.jasmine import jasmine urlpatterns = [ - url(r'', horizon.base._wrapped_include(horizon.urls)), - url(r"auth/login/", - views.LoginView.as_view(template_name="auth/login.html"), - name='login'), - url(r'auth/', include('django.contrib.auth.urls')), - url(r'^jasmine/.*?$', jasmine.dispatcher), - url(r'^jasmine-legacy/$', - TemplateView.as_view( - template_name="horizon/jasmine/jasmine_legacy.html"), - name='jasmine_tests'), + re_path(r'', horizon.base._wrapped_include(horizon.urls)), + re_path(r"auth/login/", + views.LoginView.as_view(template_name="auth/login.html"), + name='login'), + re_path(r'auth/', include('django.contrib.auth.urls')), + re_path(r'^jasmine/.*?$', jasmine.dispatcher), + re_path(r'^jasmine-legacy/$', + TemplateView.as_view( + template_name="horizon/jasmine/jasmine_legacy.html"), + name='jasmine_tests'), ] urlpatterns += staticfiles_urlpatterns() diff --git a/openstack_auth/tests/urls.py b/openstack_auth/tests/urls.py index 0a32b0841..eaafce525 100644 --- a/openstack_auth/tests/urls.py +++ b/openstack_auth/tests/urls.py @@ -12,14 +12,15 @@ # limitations under the License. from django.conf.urls import include -from django.conf.urls import url +from django.urls import re_path from django.views import generic from openstack_auth import views urlpatterns = [ - url(r"", include('openstack_auth.urls')), - url(r"^websso/$", views.websso, name='websso'), - url(r"^$", generic.TemplateView.as_view(template_name="auth/blank.html")) + re_path(r"", include('openstack_auth.urls')), + re_path(r"^websso/$", views.websso, name='websso'), + re_path(r"^$", + generic.TemplateView.as_view(template_name="auth/blank.html")) ] diff --git a/openstack_auth/urls.py b/openstack_auth/urls.py index 40160e461..027ce803d 100644 --- a/openstack_auth/urls.py +++ b/openstack_auth/urls.py @@ -12,7 +12,7 @@ # limitations under the License. from django.conf import settings -from django.conf.urls import url +from django.urls import re_path from django.views import generic from openstack_auth import utils @@ -20,30 +20,31 @@ from openstack_auth import views urlpatterns = [ - url(r"^login/$", views.login, name='login'), - url(r"^logout/$", views.logout, name='logout'), - url(r'^switch/(?P<tenant_id>[^/]+)/$', views.switch, - name='switch_tenants'), - url(r'^switch_services_region/(?P<region_name>[^/]+)/$', - views.switch_region, - name='switch_services_region'), - url(r'^switch_keystone_provider/(?P<keystone_provider>[^/]+)/$', - views.switch_keystone_provider, - name='switch_keystone_provider'), - url(r'^switch_system_scope/$', - views.switch_system_scope, - name='switch_system_scope'), + re_path(r"^login/$", views.login, name='login'), + re_path(r"^logout/$", views.logout, name='logout'), + re_path(r'^switch/(?P<tenant_id>[^/]+)/$', views.switch, + name='switch_tenants'), + re_path(r'^switch_services_region/(?P<region_name>[^/]+)/$', + views.switch_region, + name='switch_services_region'), + re_path(r'^switch_keystone_provider/(?P<keystone_provider>[^/]+)/$', + views.switch_keystone_provider, + name='switch_keystone_provider'), + re_path(r'^switch_system_scope/$', + views.switch_system_scope, + name='switch_system_scope'), ] if utils.allow_expired_passowrd_change(): urlpatterns.append( - url(r'^password/(?P<user_id>[^/]+)/$', views.PasswordView.as_view(), - name='password') + re_path(r'^password/(?P<user_id>[^/]+)/$', + views.PasswordView.as_view(), + name='password') ) if settings.WEBSSO_ENABLED: urlpatterns += [ - url(r"^websso/$", views.websso, name='websso'), - url(r"^error/$", - generic.TemplateView.as_view(template_name="403.html")) + re_path(r"^websso/$", views.websso, name='websso'), + re_path(r"^error/$", + generic.TemplateView.as_view(template_name="403.html")) ] diff --git a/openstack_dashboard/api/rest/urls.py b/openstack_dashboard/api/rest/urls.py index 8ba246586..ed0745158 100644 --- a/openstack_dashboard/api/rest/urls.py +++ b/openstack_dashboard/api/rest/urls.py @@ -11,7 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from django.conf import urls + +from django.urls import re_path urlpatterns = [] @@ -27,6 +28,6 @@ def register(view): as_view() method. The url_regex attribute of the view should be a standard Django URL regex pattern. """ - p = urls.url(view.url_regex, view.as_view()) + p = re_path(view.url_regex, view.as_view()) urlpatterns.append(p) return view diff --git a/openstack_dashboard/contrib/developer/form_builder/urls.py b/openstack_dashboard/contrib/developer/form_builder/urls.py index d74763b1b..10ff9fcf1 100644 --- a/openstack_dashboard/contrib/developer/form_builder/urls.py +++ b/openstack_dashboard/contrib/developer/form_builder/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 openstack_dashboard.contrib.developer.form_builder import views urlpatterns = [ - url('', views.IndexView.as_view(), name='index'), + re_path('', views.IndexView.as_view(), name='index'), ] diff --git a/openstack_dashboard/contrib/developer/profiler/urls.py b/openstack_dashboard/contrib/developer/profiler/urls.py index 78549a355..2b2f2493e 100644 --- a/openstack_dashboard/contrib/developer/profiler/urls.py +++ b/openstack_dashboard/contrib/developer/profiler/urls.py @@ -14,11 +14,11 @@ # under the License. -from django.conf.urls import url +from django.urls import re_path from openstack_dashboard.contrib.developer.profiler import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/openstack_dashboard/contrib/developer/resource_browser/urls.py b/openstack_dashboard/contrib/developer/resource_browser/urls.py index 05137b980..4c40165fa 100644 --- a/openstack_dashboard/contrib/developer/resource_browser/urls.py +++ b/openstack_dashboard/contrib/developer/resource_browser/urls.py @@ -12,10 +12,10 @@ # 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 horizon.browsers.views import AngularIndexView urlpatterns = [ - url('', AngularIndexView.as_view(), name='index'), + re_path('', AngularIndexView.as_view(), name='index'), ] diff --git a/openstack_dashboard/contrib/developer/theme_preview/urls.py b/openstack_dashboard/contrib/developer/theme_preview/urls.py index 9fea8f73d..c6db37d0b 100644 --- a/openstack_dashboard/contrib/developer/theme_preview/urls.py +++ b/openstack_dashboard/contrib/developer/theme_preview/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 openstack_dashboard.contrib.developer.theme_preview import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/openstack_dashboard/dashboards/admin/aggregates/urls.py b/openstack_dashboard/dashboards/admin/aggregates/urls.py index fc15d0bf6..5b143d61f 100644 --- a/openstack_dashboard/dashboards/admin/aggregates/urls.py +++ b/openstack_dashboard/dashboards/admin/aggregates/urls.py @@ -10,19 +10,19 @@ # 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 openstack_dashboard.dashboards.admin.aggregates \ import views urlpatterns = [ - url(r'^$', - views.IndexView.as_view(), name='index'), - url(r'^create/$', - views.CreateView.as_view(), name='create'), - url(r'^(?P<id>[^/]+)/update/$', - views.UpdateView.as_view(), name='update'), - url(r'^(?P<id>[^/]+)/manage_hosts/$', - views.ManageHostsView.as_view(), name='manage_hosts'), + re_path(r'^$', + views.IndexView.as_view(), name='index'), + re_path(r'^create/$', + views.CreateView.as_view(), name='create'), + re_path(r'^(?P<id>[^/]+)/update/$', + views.UpdateView.as_view(), name='update'), + re_path(r'^(?P<id>[^/]+)/manage_hosts/$', + views.ManageHostsView.as_view(), name='manage_hosts'), ] diff --git a/openstack_dashboard/dashboards/admin/backups/urls.py b/openstack_dashboard/dashboards/admin/backups/urls.py index a90b68aaa..95cfb56fa 100644 --- a/openstack_dashboard/dashboards/admin/backups/urls.py +++ b/openstack_dashboard/dashboards/admin/backups/urls.py @@ -10,20 +10,20 @@ # 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 openstack_dashboard.dashboards.admin.backups import views urlpatterns = [ - url(r'^$', views.AdminBackupsView.as_view(), name='index'), - url(r'^(?P<backup_id>[^/]+)/$', - views.AdminBackupDetailView.as_view(), - name='detail'), - url(r'^(?P<backup_id>[^/]+)/restore/$', - views.AdminRestoreBackupView.as_view(), - name='restore'), - url(r'^(?P<backup_id>[^/]+)/update_status$', - views.UpdateStatusView.as_view(), - name='update_status'), + re_path(r'^$', views.AdminBackupsView.as_view(), name='index'), + re_path(r'^(?P<backup_id>[^/]+)/$', + views.AdminBackupDetailView.as_view(), + name='detail'), + re_path(r'^(?P<backup_id>[^/]+)/restore/$', + views.AdminRestoreBackupView.as_view(), + name='restore'), + re_path(r'^(?P<backup_id>[^/]+)/update_status$', + views.UpdateStatusView.as_view(), + name='update_status'), ] diff --git a/openstack_dashboard/dashboards/admin/defaults/urls.py b/openstack_dashboard/dashboards/admin/defaults/urls.py index 89a4b834f..f41fb7762 100644 --- a/openstack_dashboard/dashboards/admin/defaults/urls.py +++ b/openstack_dashboard/dashboards/admin/defaults/urls.py @@ -12,13 +12,13 @@ # 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 openstack_dashboard.dashboards.admin.defaults import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^update_defaults$', - views.UpdateDefaultQuotasView.as_view(), name='update_defaults'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^update_defaults$', + views.UpdateDefaultQuotasView.as_view(), name='update_defaults'), ] diff --git a/openstack_dashboard/dashboards/admin/flavors/urls.py b/openstack_dashboard/dashboards/admin/flavors/urls.py index d9f2625a8..3050abcaa 100644 --- a/openstack_dashboard/dashboards/admin/flavors/urls.py +++ b/openstack_dashboard/dashboards/admin/flavors/urls.py @@ -16,7 +16,7 @@ # 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 gettext_lazy as _ from horizon.browsers.views import AngularIndexView @@ -28,16 +28,17 @@ if setting_utils.get_dict_config('ANGULAR_FEATURES', 'flavors_panel'): title = _("Flavors") # New angular panel urlpatterns = [ - url(r'^$', AngularIndexView.as_view(title=title), name='index'), - url(r'^create/$', AngularIndexView.as_view(title=title), - name='create'), - url(r'^(?P<id>[^/]+)/update/$', AngularIndexView.as_view(title=title), - name='index'), + re_path(r'^$', AngularIndexView.as_view(title=title), name='index'), + re_path(r'^create/$', AngularIndexView.as_view(title=title), + name='create'), + re_path(r'^(?P<id>[^/]+)/update/$', + AngularIndexView.as_view(title=title), + name='index'), ] else: urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(r'^(?P<id>[^/]+)/update/$', - views.UpdateView.as_view(), name='update'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(r'^(?P<id>[^/]+)/update/$', + views.UpdateView.as_view(), name='update'), ] diff --git a/openstack_dashboard/dashboards/admin/floating_ips/urls.py b/openstack_dashboard/dashboards/admin/floating_ips/urls.py index 8c19a5274..428d943f8 100644 --- a/openstack_dashboard/dashboards/admin/floating_ips/urls.py +++ b/openstack_dashboard/dashboards/admin/floating_ips/urls.py @@ -13,14 +13,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 openstack_dashboard.dashboards.admin.floating_ips import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^allocate/$', views.AllocateView.as_view(), name='allocate'), - url(r'^(?P<floating_ip_id>[^/]+)/detail/$', - views.DetailView.as_view(), name='detail') + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^allocate/$', views.AllocateView.as_view(), name='allocate'), + re_path(r'^(?P<floating_ip_id>[^/]+)/detail/$', + views.DetailView.as_view(), name='detail') ] diff --git a/openstack_dashboard/dashboards/admin/group_types/specs/urls.py b/openstack_dashboard/dashboards/admin/group_types/specs/urls.py index 1b26608dc..231d45835 100644 --- a/openstack_dashboard/dashboards/admin/group_types/specs/urls.py +++ b/openstack_dashboard/dashboards/admin/group_types/specs/urls.py @@ -10,13 +10,15 @@ # 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 openstack_dashboard.dashboards.admin.group_types.specs \ import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(r'^(?P<key>[^/]+)/edit/$', views.EditView.as_view(), name='edit'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(r'^(?P<key>[^/]+)/edit/$', + views.EditView.as_view(), + name='edit'), ] diff --git a/openstack_dashboard/dashboards/admin/group_types/urls.py b/openstack_dashboard/dashboards/admin/group_types/urls.py index 543b86e45..09bc9fa6c 100644 --- a/openstack_dashboard/dashboards/admin/group_types/urls.py +++ b/openstack_dashboard/dashboards/admin/group_types/urls.py @@ -11,7 +11,7 @@ # under the License. from django.conf.urls import include -from django.conf.urls import url +from django.urls import re_path from openstack_dashboard.dashboards.admin.group_types.specs \ import urls as specs_urls @@ -20,12 +20,12 @@ from openstack_dashboard.dashboards.admin.group_types \ urlpatterns = [ - url(r'^$', views.GroupTypesView.as_view(), name='index'), - url(r'^create_type$', views.CreateGroupTypeView.as_view(), - name='create_type'), - url(r'^(?P<type_id>[^/]+)/update_type/$', - views.EditGroupTypeView.as_view(), - name='update_type'), - url(r'^(?P<type_id>[^/]+)/specs/', - include((specs_urls, 'specs'))), + re_path(r'^$', views.GroupTypesView.as_view(), name='index'), + re_path(r'^create_type$', views.CreateGroupTypeView.as_view(), + name='create_type'), + re_path(r'^(?P<type_id>[^/]+)/update_type/$', + views.EditGroupTypeView.as_view(), + name='update_type'), + re_path(r'^(?P<type_id>[^/]+)/specs/', + include((specs_urls, 'specs'))), ] diff --git a/openstack_dashboard/dashboards/admin/hypervisors/compute/urls.py b/openstack_dashboard/dashboards/admin/hypervisors/compute/urls.py index 624e49f6a..f462d69f0 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/compute/urls.py +++ b/openstack_dashboard/dashboards/admin/hypervisors/compute/urls.py @@ -10,19 +10,19 @@ # 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 openstack_dashboard.dashboards.admin.hypervisors.compute import views urlpatterns = [ - url(r'^(?P<compute_host>[^/]+)/evacuate_host$', - views.EvacuateHostView.as_view(), - name='evacuate_host'), - url(r'^(?P<compute_host>[^/]+)/disable_service$', - views.DisableServiceView.as_view(), - name='disable_service'), - url(r'^(?P<compute_host>[^/]+)/migrate_host$', - views.MigrateHostView.as_view(), - name='migrate_host'), + re_path(r'^(?P<compute_host>[^/]+)/evacuate_host$', + views.EvacuateHostView.as_view(), + name='evacuate_host'), + re_path(r'^(?P<compute_host>[^/]+)/disable_service$', + views.DisableServiceView.as_view(), + name='disable_service'), + re_path(r'^(?P<compute_host>[^/]+)/migrate_host$', + views.MigrateHostView.as_view(), + name='migrate_host'), ] diff --git a/openstack_dashboard/dashboards/admin/hypervisors/urls.py b/openstack_dashboard/dashboards/admin/hypervisors/urls.py index f487fb6da..f80e0d950 100644 --- a/openstack_dashboard/dashboards/admin/hypervisors/urls.py +++ b/openstack_dashboard/dashboards/admin/hypervisors/urls.py @@ -13,7 +13,7 @@ # under the License. from django.conf.urls import include -from django.conf.urls import url +from django.urls import re_path from openstack_dashboard.dashboards.admin.hypervisors.compute \ import urls as compute_urls @@ -21,9 +21,9 @@ from openstack_dashboard.dashboards.admin.hypervisors import views urlpatterns = [ - url(r'^(?P<hypervisor>[^/]+)/$', - views.AdminDetailView.as_view(), - name='detail'), - url(r'^$', views.AdminIndexView.as_view(), name='index'), - url(r'', include((compute_urls, 'compute'))), + re_path(r'^(?P<hypervisor>[^/]+)/$', + views.AdminDetailView.as_view(), + name='detail'), + re_path(r'^$', views.AdminIndexView.as_view(), name='index'), + re_path(r'', include((compute_urls, 'compute'))), ] diff --git a/openstack_dashboard/dashboards/admin/images/urls.py b/openstack_dashboard/dashboards/admin/images/urls.py index cc5028618..3bb9c96b9 100644 --- a/openstack_dashboard/dashboards/admin/images/urls.py +++ b/openstack_dashboard/dashboards/admin/images/urls.py @@ -16,7 +16,7 @@ # 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 gettext_lazy as _ from horizon.browsers.views import AngularIndexView @@ -27,16 +27,16 @@ if setting_utils.get_dict_config('ANGULAR_FEATURES', 'images_panel'): title = _("Images") # New angular images urlpatterns = [ - url(r'^$', AngularIndexView.as_view(title=title), name='index'), - url(r'^(?P<image_id>[^/]+)/detail/$', - AngularIndexView.as_view(title=title), name='detail'), + re_path(r'^$', AngularIndexView.as_view(title=title), name='index'), + re_path(r'^(?P<image_id>[^/]+)/detail/$', + AngularIndexView.as_view(title=title), name='detail'), ] else: urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(r'^(?P<image_id>[^/]+)/update/$', - views.UpdateView.as_view(), name='update'), - url(r'^(?P<image_id>[^/]+)/detail/$', - views.DetailView.as_view(), name='detail') + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(r'^(?P<image_id>[^/]+)/update/$', + views.UpdateView.as_view(), name='update'), + re_path(r'^(?P<image_id>[^/]+)/detail/$', + views.DetailView.as_view(), name='detail') ] diff --git a/openstack_dashboard/dashboards/admin/info/urls.py b/openstack_dashboard/dashboards/admin/info/urls.py index 2a9c096ce..f51431c47 100644 --- a/openstack_dashboard/dashboards/admin/info/urls.py +++ b/openstack_dashboard/dashboards/admin/info/urls.py @@ -16,11 +16,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 openstack_dashboard.dashboards.admin.info import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/openstack_dashboard/dashboards/admin/instances/urls.py b/openstack_dashboard/dashboards/admin/instances/urls.py index 7029d46fc..2798e0ceb 100644 --- a/openstack_dashboard/dashboards/admin/instances/urls.py +++ b/openstack_dashboard/dashboards/admin/instances/urls.py @@ -16,7 +16,7 @@ # 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 openstack_dashboard.dashboards.admin.instances import views @@ -25,15 +25,16 @@ INSTANCES = r'^(?P<instance_id>[^/]+)/%s$' urlpatterns = [ - url(r'^$', views.AdminIndexView.as_view(), name='index'), - url(INSTANCES % 'update', views.AdminUpdateView.as_view(), name='update'), - url(INSTANCES % 'detail', views.DetailView.as_view(), name='detail'), - url(INSTANCES % 'console', views.console, name='console'), - url(INSTANCES % 'vnc', views.vnc, name='vnc'), - url(INSTANCES % 'mks', views.mks, name='mks'), - url(INSTANCES % 'spice', views.spice, name='spice'), - url(INSTANCES % 'rdp', views.rdp, name='rdp'), - url(INSTANCES % 'live_migrate', views.LiveMigrateView.as_view(), - name='live_migrate'), - url(INSTANCES % 'rescue', views.RescueView.as_view(), name='rescue'), + re_path(r'^$', views.AdminIndexView.as_view(), name='index'), + re_path(INSTANCES % 'update', views.AdminUpdateView.as_view(), + name='update'), + re_path(INSTANCES % 'detail', views.DetailView.as_view(), name='detail'), + re_path(INSTANCES % 'console', views.console, name='console'), + re_path(INSTANCES % 'vnc', views.vnc, name='vnc'), + re_path(INSTANCES % 'mks', views.mks, name='mks'), + re_path(INSTANCES % 'spice', views.spice, name='spice'), + re_path(INSTANCES % 'rdp', views.rdp, name='rdp'), + re_path(INSTANCES % 'live_migrate', views.LiveMigrateView.as_view(), + name='live_migrate'), + re_path(INSTANCES % 'rescue', views.RescueView.as_view(), name='rescue'), ] diff --git a/openstack_dashboard/dashboards/admin/metadata_defs/urls.py b/openstack_dashboard/dashboards/admin/metadata_defs/urls.py index 2721ff5b3..b825003a7 100644 --- a/openstack_dashboard/dashboards/admin/metadata_defs/urls.py +++ b/openstack_dashboard/dashboards/admin/metadata_defs/urls.py @@ -12,7 +12,7 @@ # 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 openstack_dashboard.dashboards.admin.metadata_defs import views @@ -21,10 +21,10 @@ NAMESPACES = r'^(?P<namespace_id>[^/]+)/%s$' urlpatterns = [ - url(r'^$', views.AdminIndexView.as_view(), name='index'), - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(NAMESPACES % 'update', views.UpdateView.as_view(), name='update'), - url(NAMESPACES % 'detail', views.DetailView.as_view(), name='detail'), - url(r'^(?P<id>[^/]+)/resource_types/$', - views.ManageResourceTypes.as_view(), name='resource_types'), + re_path(r'^$', views.AdminIndexView.as_view(), name='index'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(NAMESPACES % 'update', views.UpdateView.as_view(), name='update'), + re_path(NAMESPACES % 'detail', views.DetailView.as_view(), name='detail'), + re_path(r'^(?P<id>[^/]+)/resource_types/$', + views.ManageResourceTypes.as_view(), name='resource_types'), ] diff --git a/openstack_dashboard/dashboards/admin/networks/ports/urls.py b/openstack_dashboard/dashboards/admin/networks/ports/urls.py index 9ca905600..3fbc80914 100644 --- a/openstack_dashboard/dashboards/admin/networks/ports/urls.py +++ b/openstack_dashboard/dashboards/admin/networks/ports/urls.py @@ -12,7 +12,7 @@ # 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 openstack_dashboard.dashboards.admin.networks.ports import views from openstack_dashboard.dashboards.admin.networks.ports.extensions. \ @@ -22,8 +22,8 @@ PORTS = r'^(?P<port_id>[^/]+)/%s$' urlpatterns = [ - url(PORTS % 'detail', views.DetailView.as_view(), name='detail'), - url(PORTS % 'addallowedaddresspairs', - addr_pairs_views.AddAllowedAddressPair.as_view(), - name='addallowedaddresspairs'), + re_path(PORTS % 'detail', views.DetailView.as_view(), name='detail'), + re_path(PORTS % 'addallowedaddresspairs', + addr_pairs_views.AddAllowedAddressPair.as_view(), + name='addallowedaddresspairs'), ] diff --git a/openstack_dashboard/dashboards/admin/networks/subnets/urls.py b/openstack_dashboard/dashboards/admin/networks/subnets/urls.py index 8b4a507f3..841584a0c 100644 --- a/openstack_dashboard/dashboards/admin/networks/subnets/urls.py +++ b/openstack_dashboard/dashboards/admin/networks/subnets/urls.py @@ -12,7 +12,7 @@ # 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 openstack_dashboard.dashboards.admin.networks.subnets import views @@ -21,5 +21,5 @@ SUBNETS = r'^(?P<subnet_id>[^/]+)/%s$' urlpatterns = [ - url(SUBNETS % 'detail', views.DetailView.as_view(), name='detail'), + re_path(SUBNETS % 'detail', views.DetailView.as_view(), name='detail'), ] diff --git a/openstack_dashboard/dashboards/admin/networks/urls.py b/openstack_dashboard/dashboards/admin/networks/urls.py index 6332201ec..50fd4fcc6 100644 --- a/openstack_dashboard/dashboards/admin/networks/urls.py +++ b/openstack_dashboard/dashboards/admin/networks/urls.py @@ -13,7 +13,7 @@ # under the License. from django.conf.urls import include -from django.conf.urls import url +from django.urls import re_path from openstack_dashboard.dashboards.admin.networks.agents \ import views as agent_views @@ -32,27 +32,27 @@ NETWORKS = r'^(?P<network_id>[^/]+)/%s$' urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(NETWORKS % 'update', views.UpdateView.as_view(), name='update'), - url(NETWORKS % 'detail', views.DetailView.as_view(), name='detail'), - url(NETWORKS % r'detail\?tab=network_tabs__ports_tab$', - views.DetailView.as_view(), name='ports_tab'), - url(NETWORKS % r'detail\?tab=network_tabs__agents_tab$', - views.DetailView.as_view(), name='agents_tab'), - url(NETWORKS % r'detail\?tab=network_tabs__subnets_tab$', - views.DetailView.as_view(), name='subnets_tab'), - url(NETWORKS % 'agents/add', - agent_views.AddView.as_view(), name='adddhcpagent'), - url(NETWORKS % 'subnets/create', - subnet_views.CreateView.as_view(), name='createsubnet'), - url(NETWORKS % 'ports/create', - port_views.CreateView.as_view(), name='addport'), - url(r'^(?P<network_id>[^/]+)/subnets/(?P<subnet_id>[^/]+)/update$', - subnet_views.UpdateView.as_view(), name='editsubnet'), - url(r'^(?P<network_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$', - port_views.UpdateView.as_view(), name='editport'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(NETWORKS % 'update', views.UpdateView.as_view(), name='update'), + re_path(NETWORKS % 'detail', views.DetailView.as_view(), name='detail'), + re_path(NETWORKS % r'detail\?tab=network_tabs__ports_tab$', + views.DetailView.as_view(), name='ports_tab'), + re_path(NETWORKS % r'detail\?tab=network_tabs__agents_tab$', + views.DetailView.as_view(), name='agents_tab'), + re_path(NETWORKS % r'detail\?tab=network_tabs__subnets_tab$', + views.DetailView.as_view(), name='subnets_tab'), + re_path(NETWORKS % 'agents/add', + agent_views.AddView.as_view(), name='adddhcpagent'), + re_path(NETWORKS % 'subnets/create', + subnet_views.CreateView.as_view(), name='createsubnet'), + re_path(NETWORKS % 'ports/create', + port_views.CreateView.as_view(), name='addport'), + re_path(r'^(?P<network_id>[^/]+)/subnets/(?P<subnet_id>[^/]+)/update$', + subnet_views.UpdateView.as_view(), name='editsubnet'), + re_path(r'^(?P<network_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$', + port_views.UpdateView.as_view(), name='editport'), - url(r'^subnets/', include((subnet_urls, 'subnets'))), - url(r'^ports/', include((port_urls, 'ports'))), + re_path(r'^subnets/', include((subnet_urls, 'subnets'))), + re_path(r'^ports/', include((port_urls, 'ports'))), ] diff --git a/openstack_dashboard/dashboards/admin/ngflavors/urls.py b/openstack_dashboard/dashboards/admin/ngflavors/urls.py index 79bcb97a5..883e59496 100644 --- a/openstack_dashboard/dashboards/admin/ngflavors/urls.py +++ b/openstack_dashboard/dashboards/admin/ngflavors/urls.py @@ -13,11 +13,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 openstack_dashboard.dashboards.admin.ngflavors import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/openstack_dashboard/dashboards/admin/overview/urls.py b/openstack_dashboard/dashboards/admin/overview/urls.py index 652ec643f..567ab4c7f 100644 --- a/openstack_dashboard/dashboards/admin/overview/urls.py +++ b/openstack_dashboard/dashboards/admin/overview/urls.py @@ -17,11 +17,11 @@ # under the License. -from django.conf.urls import url +from django.urls import re_path from openstack_dashboard.dashboards.admin.overview import views urlpatterns = [ - url(r'^$', views.GlobalOverview.as_view(), name='index'), + re_path(r'^$', views.GlobalOverview.as_view(), name='index'), ] diff --git a/openstack_dashboard/dashboards/admin/rbac_policies/urls.py b/openstack_dashboard/dashboards/admin/rbac_policies/urls.py index b7a1ab858..7a479edf7 100644 --- a/openstack_dashboard/dashboards/admin/rbac_policies/urls.py +++ b/openstack_dashboard/dashboards/admin/rbac_policies/urls.py @@ -10,7 +10,7 @@ # 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 openstack_dashboard.dashboards.admin.rbac_policies import views @@ -19,12 +19,12 @@ RBAC_POLICY_URL = r'^(?P<rbac_policy_id>[^/]+)/%s$' urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(RBAC_POLICY_URL % '$', - views.DetailView.as_view(), - name='detail'), - url(RBAC_POLICY_URL % 'update', - views.UpdateView.as_view(), - name='update'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(RBAC_POLICY_URL % '$', + views.DetailView.as_view(), + name='detail'), + re_path(RBAC_POLICY_URL % 'update', + views.UpdateView.as_view(), + name='update'), ] diff --git a/openstack_dashboard/dashboards/admin/routers/ports/urls.py b/openstack_dashboard/dashboards/admin/routers/ports/urls.py index fe785c49e..816f91885 100644 --- a/openstack_dashboard/dashboards/admin/routers/ports/urls.py +++ b/openstack_dashboard/dashboards/admin/routers/ports/urls.py @@ -12,12 +12,12 @@ # 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 openstack_dashboard.dashboards.admin.routers.ports import views PORTS = r'^(?P<port_id>[^/]+)/%s$' urlpatterns = [ - url(PORTS % 'detail', views.DetailView.as_view(), name='detail'), + re_path(PORTS % 'detail', views.DetailView.as_view(), name='detail'), ] diff --git a/openstack_dashboard/dashboards/admin/routers/urls.py b/openstack_dashboard/dashboards/admin/routers/urls.py index e2a600f28..7e1d16e20 100644 --- a/openstack_dashboard/dashboards/admin/routers/urls.py +++ b/openstack_dashboard/dashboards/admin/routers/urls.py @@ -12,7 +12,7 @@ # 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 openstack_dashboard.dashboards.admin.routers import views @@ -21,15 +21,15 @@ ROUTER_URL = r'^(?P<router_id>[^/]+)/%s' urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(ROUTER_URL % '$', - views.DetailView.as_view(), - name='detail'), - url(ROUTER_URL % 'update', - views.UpdateView.as_view(), - name='update'), - url(r'^(?P<l3_agent_id>[^/]+)/l3_agent_list', - views.L3AgentView.as_view(), - name='l3_agent_list'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(ROUTER_URL % '$', + views.DetailView.as_view(), + name='detail'), + re_path(ROUTER_URL % 'update', + views.UpdateView.as_view(), + name='update'), + re_path(r'^(?P<l3_agent_id>[^/]+)/l3_agent_list', + views.L3AgentView.as_view(), + name='l3_agent_list'), ] diff --git a/openstack_dashboard/dashboards/admin/snapshots/urls.py b/openstack_dashboard/dashboards/admin/snapshots/urls.py index d558ae9e3..5c6dd0b51 100644 --- a/openstack_dashboard/dashboards/admin/snapshots/urls.py +++ b/openstack_dashboard/dashboards/admin/snapshots/urls.py @@ -10,17 +10,17 @@ # 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 openstack_dashboard.dashboards.admin.snapshots import views urlpatterns = [ - url(r'^$', views.SnapshotsView.as_view(), name='index'), - url(r'^(?P<snapshot_id>[^/]+)$', - views.DetailView.as_view(), - name='detail'), - url(r'^(?P<snapshot_id>[^/]+)/update_status/$', - views.UpdateStatusView.as_view(), - name='update_status'), + re_path(r'^$', views.SnapshotsView.as_view(), name='index'), + re_path(r'^(?P<snapshot_id>[^/]+)$', + views.DetailView.as_view(), + name='detail'), + re_path(r'^(?P<snapshot_id>[^/]+)/update_status/$', + views.UpdateStatusView.as_view(), + name='update_status'), ] diff --git a/openstack_dashboard/dashboards/admin/trunks/urls.py b/openstack_dashboard/dashboards/admin/trunks/urls.py index 152e74ef4..229a86033 100644 --- a/openstack_dashboard/dashboards/admin/trunks/urls.py +++ b/openstack_dashboard/dashboards/admin/trunks/urls.py @@ -12,7 +12,7 @@ # 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 gettext_lazy as _ from horizon.browsers.views import AngularIndexView @@ -20,7 +20,7 @@ from horizon.browsers.views import AngularIndexView title = _("Trunks") urlpatterns = [ - url(r'^$', AngularIndexView.as_view(title=title), name='index'), - url(r'^(?P<trunk_id>[^/]+)/$', - AngularIndexView.as_view(title=title), name='detail'), + re_path(r'^$', AngularIndexView.as_view(title=title), name='index'), + re_path(r'^(?P<trunk_id>[^/]+)/$', + AngularIndexView.as_view(title=title), name='detail'), ] diff --git a/openstack_dashboard/dashboards/admin/vg_snapshots/urls.py b/openstack_dashboard/dashboards/admin/vg_snapshots/urls.py index c8225143e..5369a8df2 100644 --- a/openstack_dashboard/dashboards/admin/vg_snapshots/urls.py +++ b/openstack_dashboard/dashboards/admin/vg_snapshots/urls.py @@ -12,13 +12,13 @@ # 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 openstack_dashboard.dashboards.admin.vg_snapshots import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^(?P<vg_snapshot_id>[^/]+)/detail/$', - views.DetailView.as_view(), - name='detail'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^(?P<vg_snapshot_id>[^/]+)/detail/$', + views.DetailView.as_view(), + name='detail'), ] diff --git a/openstack_dashboard/dashboards/admin/volume_groups/urls.py b/openstack_dashboard/dashboards/admin/volume_groups/urls.py index d34156626..3d876d03c 100644 --- a/openstack_dashboard/dashboards/admin/volume_groups/urls.py +++ b/openstack_dashboard/dashboards/admin/volume_groups/urls.py @@ -12,23 +12,23 @@ # 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 openstack_dashboard.dashboards.admin.volume_groups import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^(?P<group_id>[^/]+)$', - views.DetailView.as_view(), - name='detail'), - url(r'^(?P<group_id>[^/]+)/remove_volumese/$', - views.RemoveVolumesView.as_view(), - name='remove_volumes'), - url(r'^(?P<group_id>[^/]+)/delete/$', - views.DeleteView.as_view(), - name='delete'), - url(r'^(?P<group_id>[^/]+)/manage/$', - views.ManageView.as_view(), - name='manage'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^(?P<group_id>[^/]+)$', + views.DetailView.as_view(), + name='detail'), + re_path(r'^(?P<group_id>[^/]+)/remove_volumese/$', + views.RemoveVolumesView.as_view(), + name='remove_volumes'), + re_path(r'^(?P<group_id>[^/]+)/delete/$', + views.DeleteView.as_view(), + name='delete'), + re_path(r'^(?P<group_id>[^/]+)/manage/$', + views.ManageView.as_view(), + name='manage'), ] diff --git a/openstack_dashboard/dashboards/admin/volume_types/extras/urls.py b/openstack_dashboard/dashboards/admin/volume_types/extras/urls.py index 3271c0168..443cbd350 100644 --- a/openstack_dashboard/dashboards/admin/volume_types/extras/urls.py +++ b/openstack_dashboard/dashboards/admin/volume_types/extras/urls.py @@ -10,13 +10,13 @@ # 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 openstack_dashboard.dashboards.admin.volume_types.extras \ import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(r'^(?P<key>[^/]+)/edit/$', views.EditView.as_view(), name='edit'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(r'^(?P<key>[^/]+)/edit/$', views.EditView.as_view(), name='edit'), ] diff --git a/openstack_dashboard/dashboards/admin/volume_types/qos_specs/urls.py b/openstack_dashboard/dashboards/admin/volume_types/qos_specs/urls.py index b0123fd50..d5756c1d7 100644 --- a/openstack_dashboard/dashboards/admin/volume_types/qos_specs/urls.py +++ b/openstack_dashboard/dashboards/admin/volume_types/qos_specs/urls.py @@ -10,15 +10,16 @@ # 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 openstack_dashboard.dashboards.admin.volume_types.qos_specs \ import views urlpatterns = [ - url(r'^(?P<qos_spec_id>[^/]+)/create/$', - views.CreateKeyValuePairView.as_view(), name='create'), - url(r'^(?P<qos_spec_id>[^/]+)/$', views.IndexView.as_view(), name='index'), - url(r'^(?P<qos_spec_id>[^/]+)/key/(?P<key>[^/]+)/edit/$', - views.EditKeyValuePairView.as_view(), name='edit'), + re_path(r'^(?P<qos_spec_id>[^/]+)/create/$', + views.CreateKeyValuePairView.as_view(), name='create'), + re_path(r'^(?P<qos_spec_id>[^/]+)/$', + views.IndexView.as_view(), name='index'), + re_path(r'^(?P<qos_spec_id>[^/]+)/key/(?P<key>[^/]+)/edit/$', + views.EditKeyValuePairView.as_view(), name='edit'), ] diff --git a/openstack_dashboard/dashboards/admin/volume_types/urls.py b/openstack_dashboard/dashboards/admin/volume_types/urls.py index 43433cb38..868760236 100644 --- a/openstack_dashboard/dashboards/admin/volume_types/urls.py +++ b/openstack_dashboard/dashboards/admin/volume_types/urls.py @@ -11,7 +11,7 @@ # under the License. from django.conf.urls import include -from django.conf.urls import url +from django.urls import re_path from openstack_dashboard.dashboards.admin.volume_types.extras \ import urls as extras_urls @@ -22,33 +22,33 @@ from openstack_dashboard.dashboards.admin.volume_types \ urlpatterns = [ - url(r'^$', views.VolumeTypesView.as_view(), name='index'), - url(r'^create_type$', views.CreateVolumeTypeView.as_view(), - name='create_type'), - url(r'^(?P<type_id>[^/]+)/update_type/$', - views.EditVolumeTypeView.as_view(), - name='update_type'), - url(r'^create_qos_spec$', views.CreateQosSpecView.as_view(), - name='create_qos_spec'), - url(r'^(?P<type_id>[^/]+)/manage_qos_spec_association/$', - views.ManageQosSpecAssociationView.as_view(), - name='manage_qos_spec_association'), - url(r'^(?P<qos_spec_id>[^/]+)/edit_qos_spec_consumer/$', - views.EditQosSpecConsumerView.as_view(), - name='edit_qos_spec_consumer'), - url(r'^(?P<type_id>[^/]+)/extras/', - include((extras_urls, 'extras'))), - url(r'^(?P<volume_type_id>[^/]+)/create_type_encryption/$', - views.CreateVolumeTypeEncryptionView.as_view(), - name='create_type_encryption'), - url(r'^(?P<volume_type_id>[^/]+)/update_type_encryption/$', - views.UpdateVolumeTypeEncryptionView.as_view(), - name='update_type_encryption'), - url(r'^(?P<volume_type_id>[^/]+)/type_encryption_detail/$', - views.VolumeTypeEncryptionDetailView.as_view(), - name='type_encryption_detail'), - url(r'^qos_specs/', - include((qos_specs_urls, 'qos_specs'))), - url(r'^(?P<volume_type_id>[^/]+)/edit_access/$', - views.EditAccessView.as_view(), name='edit_access'), + re_path(r'^$', views.VolumeTypesView.as_view(), name='index'), + re_path(r'^create_type$', views.CreateVolumeTypeView.as_view(), + name='create_type'), + re_path(r'^(?P<type_id>[^/]+)/update_type/$', + views.EditVolumeTypeView.as_view(), + name='update_type'), + re_path(r'^create_qos_spec$', views.CreateQosSpecView.as_view(), + name='create_qos_spec'), + re_path(r'^(?P<type_id>[^/]+)/manage_qos_spec_association/$', + views.ManageQosSpecAssociationView.as_view(), + name='manage_qos_spec_association'), + re_path(r'^(?P<qos_spec_id>[^/]+)/edit_qos_spec_consumer/$', + views.EditQosSpecConsumerView.as_view(), + name='edit_qos_spec_consumer'), + re_path(r'^(?P<type_id>[^/]+)/extras/', + include((extras_urls, 'extras'))), + re_path(r'^(?P<volume_type_id>[^/]+)/create_type_encryption/$', + views.CreateVolumeTypeEncryptionView.as_view(), + name='create_type_encryption'), + re_path(r'^(?P<volume_type_id>[^/]+)/update_type_encryption/$', + views.UpdateVolumeTypeEncryptionView.as_view(), + name='update_type_encryption'), + re_path(r'^(?P<volume_type_id>[^/]+)/type_encryption_detail/$', + views.VolumeTypeEncryptionDetailView.as_view(), + name='type_encryption_detail'), + re_path(r'^qos_specs/', + include((qos_specs_urls, 'qos_specs'))), + re_path(r'^(?P<volume_type_id>[^/]+)/edit_access/$', + views.EditAccessView.as_view(), name='edit_access'), ] diff --git a/openstack_dashboard/dashboards/admin/volumes/urls.py b/openstack_dashboard/dashboards/admin/volumes/urls.py index 74ee26e81..55a192536 100644 --- a/openstack_dashboard/dashboards/admin/volumes/urls.py +++ b/openstack_dashboard/dashboards/admin/volumes/urls.py @@ -10,28 +10,28 @@ # 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 openstack_dashboard.dashboards.admin.volumes import views urlpatterns = [ - url(r'^$', - views.VolumesView.as_view(), - name='index'), - url(r'^manage/$', - views.ManageVolumeView.as_view(), - name='manage'), - url(r'^(?P<volume_id>[^/]+)/$', - views.DetailView.as_view(), - name='detail'), - url(r'^(?P<volume_id>[^/]+)/update_status$', - views.UpdateStatusView.as_view(), - name='update_status'), - url(r'^(?P<volume_id>[^/]+)/unmanage$', - views.UnmanageVolumeView.as_view(), - name='unmanage'), - url(r'^(?P<volume_id>[^/]+)/migrate$', - views.MigrateVolumeView.as_view(), - name='migrate'), + re_path(r'^$', + views.VolumesView.as_view(), + name='index'), + re_path(r'^manage/$', + views.ManageVolumeView.as_view(), + name='manage'), + re_path(r'^(?P<volume_id>[^/]+)/$', + views.DetailView.as_view(), + name='detail'), + re_path(r'^(?P<volume_id>[^/]+)/update_status$', + views.UpdateStatusView.as_view(), + name='update_status'), + re_path(r'^(?P<volume_id>[^/]+)/unmanage$', + views.UnmanageVolumeView.as_view(), + name='unmanage'), + re_path(r'^(?P<volume_id>[^/]+)/migrate$', + views.MigrateVolumeView.as_view(), + name='migrate'), ] diff --git a/openstack_dashboard/dashboards/identity/application_credentials/urls.py b/openstack_dashboard/dashboards/identity/application_credentials/urls.py index 24e3061db..a3deb70ea 100644 --- a/openstack_dashboard/dashboards/identity/application_credentials/urls.py +++ b/openstack_dashboard/dashboards/identity/application_credentials/urls.py @@ -13,23 +13,23 @@ # under the License. -from django.conf.urls import url +from django.urls import re_path from openstack_dashboard.dashboards.identity.application_credentials \ import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(r'^(?P<application_credential_id>[^/]+)/detail/$', - views.DetailView.as_view(), name='detail'), - url(r'^success/$', - views.CreateSuccessfulView.as_view(), name='success'), - url(r'^download_openrc/$', - views.download_rc_file, name='download_openrc'), - url(r'^download_kubeconfig/$', - views.download_kubeconfig_file, name='download_kubeconfig'), - url(r'^download_clouds_yaml/$', - views.download_clouds_yaml_file, name='download_clouds_yaml'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(r'^(?P<application_credential_id>[^/]+)/detail/$', + views.DetailView.as_view(), name='detail'), + re_path(r'^success/$', + views.CreateSuccessfulView.as_view(), name='success'), + re_path(r'^download_openrc/$', + views.download_rc_file, name='download_openrc'), + re_path(r'^download_kubeconfig/$', + views.download_kubeconfig_file, name='download_kubeconfig'), + re_path(r'^download_clouds_yaml/$', + views.download_clouds_yaml_file, name='download_clouds_yaml'), ] diff --git a/openstack_dashboard/dashboards/identity/domains/urls.py b/openstack_dashboard/dashboards/identity/domains/urls.py index 548991587..c824338e1 100644 --- a/openstack_dashboard/dashboards/identity/domains/urls.py +++ b/openstack_dashboard/dashboards/identity/domains/urls.py @@ -12,7 +12,7 @@ # 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 gettext_lazy as _ from horizon.browsers import views @@ -24,12 +24,13 @@ from openstack_dashboard.utils import settings as setting_utils if setting_utils.get_dict_config('ANGULAR_FEATURES', 'domains_panel'): title = _("Domains") urlpatterns = [ - url('', views.AngularIndexView.as_view(title=title), name='index'), + re_path('', views.AngularIndexView.as_view(title=title), name='index'), ] else: urlpatterns = [ - url(r'^$', legacyView.IndexView.as_view(), name='index'), - url(r'^create$', legacyView.CreateDomainView.as_view(), name='create'), - url(r'^(?P<domain_id>[^/]+)/update/$', - legacyView.UpdateDomainView.as_view(), name='update') + re_path(r'^$', legacyView.IndexView.as_view(), name='index'), + re_path(r'^create$', + legacyView.CreateDomainView.as_view(), name='create'), + re_path(r'^(?P<domain_id>[^/]+)/update/$', + legacyView.UpdateDomainView.as_view(), name='update') ] diff --git a/openstack_dashboard/dashboards/identity/groups/urls.py b/openstack_dashboard/dashboards/identity/groups/urls.py index 45e74e8f2..de5b671b1 100644 --- a/openstack_dashboard/dashboards/identity/groups/urls.py +++ b/openstack_dashboard/dashboards/identity/groups/urls.py @@ -12,7 +12,7 @@ # 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 horizon.browsers.views import AngularIndexView @@ -24,16 +24,16 @@ from openstack_dashboard.utils import settings as setting_utils if setting_utils.get_dict_config('ANGULAR_FEATURES', 'groups_panel'): title = panel.Groups.name urlpatterns = [ - url(r'^$', AngularIndexView.as_view(title=title), name='index'), + re_path(r'^$', AngularIndexView.as_view(title=title), name='index'), ] else: urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^create$', views.CreateView.as_view(), name='create'), - url(r'^(?P<group_id>[^/]+)/update/$', - views.UpdateView.as_view(), name='update'), - url(r'^(?P<group_id>[^/]+)/manage_members/$', - views.ManageMembersView.as_view(), name='manage_members'), - url(r'^(?P<group_id>[^/]+)/add_members/$', - views.NonMembersView.as_view(), name='add_members'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^create$', views.CreateView.as_view(), name='create'), + re_path(r'^(?P<group_id>[^/]+)/update/$', + views.UpdateView.as_view(), name='update'), + re_path(r'^(?P<group_id>[^/]+)/manage_members/$', + views.ManageMembersView.as_view(), name='manage_members'), + re_path(r'^(?P<group_id>[^/]+)/add_members/$', + views.NonMembersView.as_view(), name='add_members'), ] diff --git a/openstack_dashboard/dashboards/identity/identity_providers/protocols/urls.py b/openstack_dashboard/dashboards/identity/identity_providers/protocols/urls.py index 8c1e5494f..66e889953 100644 --- a/openstack_dashboard/dashboards/identity/identity_providers/protocols/urls.py +++ b/openstack_dashboard/dashboards/identity/identity_providers/protocols/urls.py @@ -12,7 +12,7 @@ # 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 openstack_dashboard.dashboards.identity.identity_providers.protocols \ import views @@ -20,5 +20,5 @@ from openstack_dashboard.dashboards.identity.identity_providers.protocols \ PORTS = r'^(?P<protocol_id>[^/]+)/%s$' urlpatterns = [ - url(r'^create/$', views.AddProtocolView.as_view(), name='create'), + re_path(r'^create/$', views.AddProtocolView.as_view(), name='create'), ] diff --git a/openstack_dashboard/dashboards/identity/identity_providers/urls.py b/openstack_dashboard/dashboards/identity/identity_providers/urls.py index 8d6aa553a..bf30e7724 100644 --- a/openstack_dashboard/dashboards/identity/identity_providers/urls.py +++ b/openstack_dashboard/dashboards/identity/identity_providers/urls.py @@ -13,7 +13,7 @@ # under the License. from django.conf.urls import include -from django.conf.urls import url +from django.urls import re_path from openstack_dashboard.dashboards.identity.identity_providers.protocols \ import urls as protocol_urls @@ -21,16 +21,16 @@ from openstack_dashboard.dashboards.identity.identity_providers \ import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^(?P<identity_provider_id>[^/]+)/detail/$', - views.DetailView.as_view(), name='detail'), - url(r'^(?P<identity_provider_id>[^/]+)/detail/' - r'\?tab=idp_details__protocols$', - views.DetailView.as_view(), - name='protocols_tab'), - url(r'^(?P<identity_provider_id>[^/]+)/update/$', - views.UpdateView.as_view(), name='update'), - url(r'^register/$', views.RegisterView.as_view(), name='register'), - url(r'(?P<identity_provider_id>[^/]+)/protocols/', - include((protocol_urls, 'protocols'))), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^(?P<identity_provider_id>[^/]+)/detail/$', + views.DetailView.as_view(), name='detail'), + re_path(r'^(?P<identity_provider_id>[^/]+)/detail/' + r'\?tab=idp_details__protocols$', + views.DetailView.as_view(), + name='protocols_tab'), + re_path(r'^(?P<identity_provider_id>[^/]+)/update/$', + views.UpdateView.as_view(), name='update'), + re_path(r'^register/$', views.RegisterView.as_view(), name='register'), + re_path(r'(?P<identity_provider_id>[^/]+)/protocols/', + include((protocol_urls, 'protocols'))), ] diff --git a/openstack_dashboard/dashboards/identity/mappings/urls.py b/openstack_dashboard/dashboards/identity/mappings/urls.py index 77a243e9e..0a4631d36 100644 --- a/openstack_dashboard/dashboards/identity/mappings/urls.py +++ b/openstack_dashboard/dashboards/identity/mappings/urls.py @@ -12,13 +12,13 @@ # 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 openstack_dashboard.dashboards.identity.mappings import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^(?P<mapping_id>[^/]+)/update/$', - views.UpdateView.as_view(), name='update'), - url(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^(?P<mapping_id>[^/]+)/update/$', + views.UpdateView.as_view(), name='update'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), ] diff --git a/openstack_dashboard/dashboards/identity/projects/urls.py b/openstack_dashboard/dashboards/identity/projects/urls.py index fa7a88478..f2dfc9dab 100644 --- a/openstack_dashboard/dashboards/identity/projects/urls.py +++ b/openstack_dashboard/dashboards/identity/projects/urls.py @@ -16,20 +16,20 @@ # 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 openstack_dashboard.dashboards.identity.projects import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^create$', views.CreateProjectView.as_view(), name='create'), - url(r'^(?P<tenant_id>[^/]+)/update/$', - views.UpdateProjectView.as_view(), name='update'), - url(r'^(?P<project_id>[^/]+)/usage/$', - views.ProjectUsageView.as_view(), name='usage'), - url(r'^(?P<project_id>[^/]+)/detail/$', - views.DetailProjectView.as_view(), name='detail'), - url(r'^(?P<tenant_id>[^/]+)/update_quotas/$', - views.UpdateQuotasView.as_view(), name='update_quotas'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^create$', views.CreateProjectView.as_view(), name='create'), + re_path(r'^(?P<tenant_id>[^/]+)/update/$', + views.UpdateProjectView.as_view(), name='update'), + re_path(r'^(?P<project_id>[^/]+)/usage/$', + views.ProjectUsageView.as_view(), name='usage'), + re_path(r'^(?P<project_id>[^/]+)/detail/$', + views.DetailProjectView.as_view(), name='detail'), + re_path(r'^(?P<tenant_id>[^/]+)/update_quotas/$', + views.UpdateQuotasView.as_view(), name='update_quotas'), ] diff --git a/openstack_dashboard/dashboards/identity/roles/urls.py b/openstack_dashboard/dashboards/identity/roles/urls.py index 9c8a719bc..e0453caca 100644 --- a/openstack_dashboard/dashboards/identity/roles/urls.py +++ b/openstack_dashboard/dashboards/identity/roles/urls.py @@ -12,7 +12,7 @@ # 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 gettext_lazy as _ from horizon.browsers.views import AngularIndexView @@ -24,12 +24,12 @@ if setting_utils.get_dict_config('ANGULAR_FEATURES', 'roles_panel'): # New angular panel title = _('Roles') urlpatterns = [ - url(r'^$', AngularIndexView.as_view(title=title), name='index'), + re_path(r'^$', AngularIndexView.as_view(title=title), name='index'), ] else: urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^(?P<role_id>[^/]+)/update/$', - views.UpdateView.as_view(), name='update'), - url(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^(?P<role_id>[^/]+)/update/$', + views.UpdateView.as_view(), name='update'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), ] diff --git a/openstack_dashboard/dashboards/identity/users/urls.py b/openstack_dashboard/dashboards/identity/users/urls.py index 82f5f166a..1b99c0422 100644 --- a/openstack_dashboard/dashboards/identity/users/urls.py +++ b/openstack_dashboard/dashboards/identity/users/urls.py @@ -16,7 +16,7 @@ # 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 gettext_lazy as _ from horizon.browsers.views import AngularIndexView @@ -28,16 +28,16 @@ if setting_utils.get_dict_config('ANGULAR_FEATURES', 'users_panel'): title = _("Users") # new angular panel urlpatterns = [ - url(r'^$', AngularIndexView.as_view(title=title), name='index'), + re_path(r'^$', AngularIndexView.as_view(title=title), name='index'), ] else: urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^(?P<user_id>[^/]+)/update/$', - views.UpdateView.as_view(), name='update'), - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(r'^(?P<user_id>[^/]+)/detail/$', - views.DetailView.as_view(), name='detail'), - url(r'^(?P<user_id>[^/]+)/change_password/$', - views.ChangePasswordView.as_view(), name='change_password'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^(?P<user_id>[^/]+)/update/$', + views.UpdateView.as_view(), name='update'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(r'^(?P<user_id>[^/]+)/detail/$', + views.DetailView.as_view(), name='detail'), + re_path(r'^(?P<user_id>[^/]+)/change_password/$', + views.ChangePasswordView.as_view(), name='change_password'), ] diff --git a/openstack_dashboard/dashboards/project/api_access/urls.py b/openstack_dashboard/dashboards/project/api_access/urls.py index dc0879a0f..e07fef506 100644 --- a/openstack_dashboard/dashboards/project/api_access/urls.py +++ b/openstack_dashboard/dashboards/project/api_access/urls.py @@ -16,18 +16,19 @@ # 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 openstack_dashboard.dashboards.project.api_access import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^ec2/$', views.download_ec2_bundle, name='ec2'), - url(r'^clouds.yaml/$', - views.download_clouds_yaml_file, name='clouds.yaml'), - url(r'^openrc/$', views.download_rc_file, name='openrc'), - url(r'^view_credentials/$', views.CredentialsView.as_view(), - name='view_credentials'), - url(r'^recreate_ec2_credentials/$', - views.RecreateCredentialsView.as_view(), name='recreate_credentials'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^ec2/$', views.download_ec2_bundle, name='ec2'), + re_path(r'^clouds.yaml/$', + views.download_clouds_yaml_file, name='clouds.yaml'), + re_path(r'^openrc/$', views.download_rc_file, name='openrc'), + re_path(r'^view_credentials/$', views.CredentialsView.as_view(), + name='view_credentials'), + re_path(r'^recreate_ec2_credentials/$', + views.RecreateCredentialsView.as_view(), + name='recreate_credentials'), ] diff --git a/openstack_dashboard/dashboards/project/backups/urls.py b/openstack_dashboard/dashboards/project/backups/urls.py index 77800a170..667158996 100644 --- a/openstack_dashboard/dashboards/project/backups/urls.py +++ b/openstack_dashboard/dashboards/project/backups/urls.py @@ -10,17 +10,17 @@ # 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 openstack_dashboard.dashboards.project.backups import views urlpatterns = [ - url(r'^$', views.BackupsView.as_view(), name='index'), - url(r'^(?P<backup_id>[^/]+)/$', - views.BackupDetailView.as_view(), - name='detail'), - url(r'^(?P<backup_id>[^/]+)/restore/$', - views.RestoreBackupView.as_view(), - name='restore'), + re_path(r'^$', views.BackupsView.as_view(), name='index'), + re_path(r'^(?P<backup_id>[^/]+)/$', + views.BackupDetailView.as_view(), + name='detail'), + re_path(r'^(?P<backup_id>[^/]+)/restore/$', + views.RestoreBackupView.as_view(), + name='restore'), ] diff --git a/openstack_dashboard/dashboards/project/containers/urls.py b/openstack_dashboard/dashboards/project/containers/urls.py index ca3a50452..260f7e3b2 100644 --- a/openstack_dashboard/dashboards/project/containers/urls.py +++ b/openstack_dashboard/dashboards/project/containers/urls.py @@ -16,14 +16,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 openstack_dashboard.dashboards.project.containers import views urlpatterns = [ - url(r'^container/((?P<container_name>.+?)/)?' - '(?P<subfolder_path>.+)?$', - views.NgIndexView.as_view(), name='index'), - url(r'^$', - views.NgIndexView.as_view(), name='index') + re_path(r'^container/((?P<container_name>.+?)/)?' + '(?P<subfolder_path>.+)?$', + views.NgIndexView.as_view(), name='index'), + re_path(r'^$', + views.NgIndexView.as_view(), name='index') ] diff --git a/openstack_dashboard/dashboards/project/floating_ips/urls.py b/openstack_dashboard/dashboards/project/floating_ips/urls.py index 5d7ca6182..1b5873828 100644 --- a/openstack_dashboard/dashboards/project/floating_ips/urls.py +++ b/openstack_dashboard/dashboards/project/floating_ips/urls.py @@ -16,12 +16,12 @@ # 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 openstack_dashboard.dashboards.project.floating_ips import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^associate/$', views.AssociateView.as_view(), name='associate'), - url(r'^allocate/$', views.AllocateView.as_view(), name='allocate'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^associate/$', views.AssociateView.as_view(), name='associate'), + re_path(r'^allocate/$', views.AllocateView.as_view(), name='allocate'), ] diff --git a/openstack_dashboard/dashboards/project/images/images/urls.py b/openstack_dashboard/dashboards/project/images/images/urls.py index 4a3685296..6d86f7881 100644 --- a/openstack_dashboard/dashboards/project/images/images/urls.py +++ b/openstack_dashboard/dashboards/project/images/images/urls.py @@ -16,7 +16,7 @@ # 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 gettext_lazy as _ from horizon.browsers.views import AngularIndexView @@ -27,14 +27,15 @@ from openstack_dashboard.utils import settings as setting_utils if setting_utils.get_dict_config('ANGULAR_FEATURES', 'images_panel'): title = _("Images") urlpatterns = [ - url(r'^(?P<image_id>[^/]+)/$', AngularIndexView.as_view(title=title), - name='detail'), + re_path(r'^(?P<image_id>[^/]+)/$', + AngularIndexView.as_view(title=title), + name='detail'), ] else: urlpatterns = [ - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(r'^(?P<image_id>[^/]+)/update/$', - views.UpdateView.as_view(), name='update'), - url(r'^(?P<image_id>[^/]+)/$', views.DetailView.as_view(), - name='detail'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(r'^(?P<image_id>[^/]+)/update/$', + views.UpdateView.as_view(), name='update'), + re_path(r'^(?P<image_id>[^/]+)/$', views.DetailView.as_view(), + name='detail'), ] diff --git a/openstack_dashboard/dashboards/project/images/snapshots/urls.py b/openstack_dashboard/dashboards/project/images/snapshots/urls.py index 45885813e..ad7cd753f 100644 --- a/openstack_dashboard/dashboards/project/images/snapshots/urls.py +++ b/openstack_dashboard/dashboards/project/images/snapshots/urls.py @@ -16,13 +16,13 @@ # 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 openstack_dashboard.dashboards.project.images.snapshots import views urlpatterns = [ - url(r'^(?P<instance_id>[^/]+)/create/$', - views.CreateView.as_view(), - name='create') + re_path(r'^(?P<instance_id>[^/]+)/create/$', + views.CreateView.as_view(), + name='create') ] diff --git a/openstack_dashboard/dashboards/project/images/urls.py b/openstack_dashboard/dashboards/project/images/urls.py index 8b0e30004..acda7c865 100644 --- a/openstack_dashboard/dashboards/project/images/urls.py +++ b/openstack_dashboard/dashboards/project/images/urls.py @@ -17,7 +17,7 @@ # under the License. from django.conf.urls import include -from django.conf.urls import url +from django.urls import re_path from django.utils.translation import gettext_lazy as _ from horizon.browsers.views import AngularIndexView @@ -33,13 +33,13 @@ if setting_utils.get_dict_config('ANGULAR_FEATURES', 'images_panel'): title = _("Images") # New angular images urlpatterns = [ - url(r'^$', AngularIndexView.as_view(title=title), name='index'), - url(r'', include((image_urls, 'images'))), - url(r'', include((snapshot_urls, 'snapshots'))), + re_path(r'^$', AngularIndexView.as_view(title=title), name='index'), + re_path(r'', include((image_urls, 'images'))), + re_path(r'', include((snapshot_urls, 'snapshots'))), ] else: urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'', include((image_urls, 'images'))), - url(r'', include((snapshot_urls, 'snapshots'))), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'', include((image_urls, 'images'))), + re_path(r'', include((snapshot_urls, 'snapshots'))), ] diff --git a/openstack_dashboard/dashboards/project/instances/urls.py b/openstack_dashboard/dashboards/project/instances/urls.py index 7d76c3ef8..dd35311ae 100644 --- a/openstack_dashboard/dashboards/project/instances/urls.py +++ b/openstack_dashboard/dashboards/project/instances/urls.py @@ -16,7 +16,7 @@ # 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 openstack_dashboard.dashboards.project.instances import views @@ -25,36 +25,35 @@ INSTANCES = r'^(?P<instance_id>[^/]+)/%s$' INSTANCES_KEYPAIR = r'^(?P<instance_id>[^/]+)/(?P<keypair_name>[^/]+)/%s$' urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^(?P<instance_id>[^/]+)/$', - views.DetailView.as_view(), name='detail'), - url(INSTANCES % 'update', views.UpdateView.as_view(), name='update'), - url(INSTANCES % 'rebuild', views.RebuildView.as_view(), name='rebuild'), - url(INSTANCES % 'serial', views.SerialConsoleView.as_view(), - name='serial'), - url(INSTANCES % 'console', views.console, name='console'), - url(INSTANCES % 'auto_console', views.auto_console, name='auto_console'), - url(INSTANCES % 'vnc', views.vnc, name='vnc'), - url(INSTANCES % 'spice', views.spice, name='spice'), - url(INSTANCES % 'rdp', views.rdp, name='rdp'), - url(INSTANCES % 'resize', views.ResizeView.as_view(), name='resize'), - url(INSTANCES_KEYPAIR % 'decryptpassword', - views.DecryptPasswordView.as_view(), name='decryptpassword'), - url(INSTANCES % 'disassociate', - views.DisassociateView.as_view(), name='disassociate'), - url(INSTANCES % 'attach_interface', - views.AttachInterfaceView.as_view(), name='attach_interface'), - url(INSTANCES % 'detach_interface', - views.DetachInterfaceView.as_view(), name='detach_interface'), - url(r'^(?P<instance_id>[^/]+)/attach_volume/$', - views.AttachVolumeView.as_view(), - name='attach_volume' - ), - url(r'^(?P<instance_id>[^/]+)/detach_volume/$', - views.DetachVolumeView.as_view(), - name='detach_volume' - ), - url(r'^(?P<instance_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$', - views.UpdatePortView.as_view(), name='update_port'), - url(INSTANCES % 'rescue', views.RescueView.as_view(), name='rescue'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^(?P<instance_id>[^/]+)/$', + views.DetailView.as_view(), name='detail'), + re_path(INSTANCES % 'update', views.UpdateView.as_view(), name='update'), + re_path(INSTANCES % 'rebuild', views.RebuildView.as_view(), name='rebuild'), + re_path(INSTANCES % 'serial', views.SerialConsoleView.as_view(), + name='serial'), + re_path(INSTANCES % 'console', views.console, name='console'), + re_path(INSTANCES % 'auto_console', + views.auto_console, name='auto_console'), + re_path(INSTANCES % 'vnc', views.vnc, name='vnc'), + re_path(INSTANCES % 'spice', views.spice, name='spice'), + re_path(INSTANCES % 'rdp', views.rdp, name='rdp'), + re_path(INSTANCES % 'resize', views.ResizeView.as_view(), name='resize'), + re_path(INSTANCES_KEYPAIR % 'decryptpassword', + views.DecryptPasswordView.as_view(), name='decryptpassword'), + re_path(INSTANCES % 'disassociate', + views.DisassociateView.as_view(), name='disassociate'), + re_path(INSTANCES % 'attach_interface', + views.AttachInterfaceView.as_view(), name='attach_interface'), + re_path(INSTANCES % 'detach_interface', + views.DetachInterfaceView.as_view(), name='detach_interface'), + re_path(r'^(?P<instance_id>[^/]+)/attach_volume/$', + views.AttachVolumeView.as_view(), + name='attach_volume'), + re_path(r'^(?P<instance_id>[^/]+)/detach_volume/$', + views.DetachVolumeView.as_view(), + name='detach_volume'), + re_path(r'^(?P<instance_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$', + views.UpdatePortView.as_view(), name='update_port'), + re_path(INSTANCES % 'rescue', views.RescueView.as_view(), name='rescue'), ] diff --git a/openstack_dashboard/dashboards/project/key_pairs/urls.py b/openstack_dashboard/dashboards/project/key_pairs/urls.py index 139f2ffb9..d6f95f51d 100644 --- a/openstack_dashboard/dashboards/project/key_pairs/urls.py +++ b/openstack_dashboard/dashboards/project/key_pairs/urls.py @@ -16,7 +16,7 @@ # 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 gettext_lazy as _ from horizon.browsers import views @@ -27,15 +27,16 @@ from openstack_dashboard.utils import settings as setting_utils if setting_utils.get_dict_config('ANGULAR_FEATURES', 'key_pairs_panel'): title = _("Key Pairs") urlpatterns = [ - url('', views.AngularIndexView.as_view(title=title), name='index'), - url(r'^(?P<keypair_name>[^/]+)/$', - views.AngularIndexView.as_view(title=title), - name='detail'), + re_path('', views.AngularIndexView.as_view(title=title), name='index'), + re_path(r'^(?P<keypair_name>[^/]+)/$', + views.AngularIndexView.as_view(title=title), + name='detail'), ] else: urlpatterns = [ - url(r'^$', legacy_views.IndexView.as_view(), name='index'), - url(r'^import/$', legacy_views.ImportView.as_view(), name='import'), - url(r'^(?P<keypair_name>[^/]+)/$', legacy_views.DetailView.as_view(), - name='detail'), + re_path(r'^$', legacy_views.IndexView.as_view(), name='index'), + re_path(r'^import/$', legacy_views.ImportView.as_view(), name='import'), + re_path(r'^(?P<keypair_name>[^/]+)/$', + legacy_views.DetailView.as_view(), + name='detail'), ] diff --git a/openstack_dashboard/dashboards/project/network_qos/urls.py b/openstack_dashboard/dashboards/project/network_qos/urls.py index 0937bafd6..f62e1f438 100644 --- a/openstack_dashboard/dashboards/project/network_qos/urls.py +++ b/openstack_dashboard/dashboards/project/network_qos/urls.py @@ -10,7 +10,7 @@ # 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 gettext_lazy as _ from horizon.browsers import views @@ -18,5 +18,5 @@ from horizon.browsers import views title = _("Network QoS Policies") urlpatterns = [ - url(r'^$', views.AngularIndexView.as_view(title=title), name='index'), + re_path(r'^$', views.AngularIndexView.as_view(title=title), name='index'), ] diff --git a/openstack_dashboard/dashboards/project/network_topology/urls.py b/openstack_dashboard/dashboards/project/network_topology/urls.py index 1482294fe..0e6895bc7 100644 --- a/openstack_dashboard/dashboards/project/network_topology/urls.py +++ b/openstack_dashboard/dashboards/project/network_topology/urls.py @@ -16,27 +16,29 @@ # 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 openstack_dashboard.dashboards.project.network_topology import views urlpatterns = [ - url(r'^$', views.NetworkTopologyView.as_view(), name='index'), - url(r'^router$', views.RouterView.as_view(), name='router'), - url(r'^network$', views.NetworkView.as_view(), name='network'), - url(r'^instance$', views.InstanceView.as_view(), name='instance'), - url(r'^router/(?P<router_id>[^/]+)/$', views.RouterDetailView.as_view(), - name='detail'), - url(r'^router/(?P<router_id>[^/]+)/addinterface$', - views.NTAddInterfaceView.as_view(), name='interface'), - url(r'^network/(?P<network_id>[^/]+)/$', views.NetworkDetailView.as_view(), - name='detail'), - url(r'^network/(?P<network_id>[^/]+)/subnet/create$', - views.NTCreateSubnetView.as_view(), name='subnet'), - url(r'^json$', views.JSONView.as_view(), name='json'), - url(r'^createnetwork$', views.NTCreateNetworkView.as_view(), - name='createnetwork'), - url(r'^createrouter$', views.NTCreateRouterView.as_view(), - name='createrouter'), + re_path(r'^$', views.NetworkTopologyView.as_view(), name='index'), + re_path(r'^router$', views.RouterView.as_view(), name='router'), + re_path(r'^network$', views.NetworkView.as_view(), name='network'), + re_path(r'^instance$', views.InstanceView.as_view(), name='instance'), + re_path(r'^router/(?P<router_id>[^/]+)/$', + views.RouterDetailView.as_view(), + name='detail'), + re_path(r'^router/(?P<router_id>[^/]+)/addinterface$', + views.NTAddInterfaceView.as_view(), name='interface'), + re_path(r'^network/(?P<network_id>[^/]+)/$', + views.NetworkDetailView.as_view(), + name='detail'), + re_path(r'^network/(?P<network_id>[^/]+)/subnet/create$', + views.NTCreateSubnetView.as_view(), name='subnet'), + re_path(r'^json$', views.JSONView.as_view(), name='json'), + re_path(r'^createnetwork$', views.NTCreateNetworkView.as_view(), + name='createnetwork'), + re_path(r'^createrouter$', views.NTCreateRouterView.as_view(), + name='createrouter'), ] diff --git a/openstack_dashboard/dashboards/project/networks/ports/urls.py b/openstack_dashboard/dashboards/project/networks/ports/urls.py index 77f019e77..0d7ec4882 100644 --- a/openstack_dashboard/dashboards/project/networks/ports/urls.py +++ b/openstack_dashboard/dashboards/project/networks/ports/urls.py @@ -12,7 +12,7 @@ # 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 openstack_dashboard.dashboards.project.networks.ports import views from openstack_dashboard.dashboards.project.networks.ports.extensions. \ @@ -22,8 +22,8 @@ from openstack_dashboard.dashboards.project.networks.ports.extensions. \ PORTS = r'^(?P<port_id>[^/]+)/%s$' urlpatterns = [ - url(PORTS % 'detail', views.DetailView.as_view(), name='detail'), - url(PORTS % 'addallowedaddresspairs', - addr_pairs_views.AddAllowedAddressPair.as_view(), - name='addallowedaddresspairs') + re_path(PORTS % 'detail', views.DetailView.as_view(), name='detail'), + re_path(PORTS % 'addallowedaddresspairs', + addr_pairs_views.AddAllowedAddressPair.as_view(), + name='addallowedaddresspairs') ] diff --git a/openstack_dashboard/dashboards/project/networks/subnets/urls.py b/openstack_dashboard/dashboards/project/networks/subnets/urls.py index 8f187d6f7..3fb3c4a30 100644 --- a/openstack_dashboard/dashboards/project/networks/subnets/urls.py +++ b/openstack_dashboard/dashboards/project/networks/subnets/urls.py @@ -12,7 +12,7 @@ # 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 openstack_dashboard.dashboards.project.networks.subnets import views @@ -20,5 +20,5 @@ from openstack_dashboard.dashboards.project.networks.subnets import views SUBNETS = r'^(?P<subnet_id>[^/]+)/%s$' urlpatterns = [ - url(SUBNETS % 'detail', views.DetailView.as_view(), name='detail'), + re_path(SUBNETS % 'detail', views.DetailView.as_view(), name='detail'), ] diff --git a/openstack_dashboard/dashboards/project/networks/urls.py b/openstack_dashboard/dashboards/project/networks/urls.py index 8b7ba019d..904f9842d 100644 --- a/openstack_dashboard/dashboards/project/networks/urls.py +++ b/openstack_dashboard/dashboards/project/networks/urls.py @@ -13,7 +13,7 @@ # under the License. from django.conf.urls import include -from django.conf.urls import url +from django.urls import re_path from openstack_dashboard.dashboards.project.networks.ports \ import urls as port_urls @@ -30,24 +30,24 @@ NETWORKS = r'^(?P<network_id>[^/]+)/%s$' urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^create$', views.CreateView.as_view(), name='create'), - url(NETWORKS % r'detail(\?tab=network_tabs__overview)?$', - views.DetailView.as_view(), - name='detail'), - url(NETWORKS % r'detail\?tab=network_tabs__ports_tab$', - views.DetailView.as_view(), name='ports_tab'), - url(NETWORKS % r'detail\?tab=network_tabs__subnets_tab$', - views.DetailView.as_view(), name='subnets_tab'), - url(NETWORKS % 'update', views.UpdateView.as_view(), name='update'), - url(NETWORKS % 'subnets/create', subnet_views.CreateView.as_view(), - name='createsubnet'), - url(NETWORKS % 'ports/create', - port_views.CreateView.as_view(), name='addport'), - url(r'^(?P<network_id>[^/]+)/subnets/(?P<subnet_id>[^/]+)/update$', - subnet_views.UpdateView.as_view(), name='editsubnet'), - url(r'^(?P<network_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$', - port_views.UpdateView.as_view(), name='editport'), - url(r'^subnets/', include((subnet_urls, 'subnets'))), - url(r'^ports/', include((port_urls, 'ports'))), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^create$', views.CreateView.as_view(), name='create'), + re_path(NETWORKS % r'detail(\?tab=network_tabs__overview)?$', + views.DetailView.as_view(), + name='detail'), + re_path(NETWORKS % r'detail\?tab=network_tabs__ports_tab$', + views.DetailView.as_view(), name='ports_tab'), + re_path(NETWORKS % r'detail\?tab=network_tabs__subnets_tab$', + views.DetailView.as_view(), name='subnets_tab'), + re_path(NETWORKS % 'update', views.UpdateView.as_view(), name='update'), + re_path(NETWORKS % 'subnets/create', subnet_views.CreateView.as_view(), + name='createsubnet'), + re_path(NETWORKS % 'ports/create', + port_views.CreateView.as_view(), name='addport'), + re_path(r'^(?P<network_id>[^/]+)/subnets/(?P<subnet_id>[^/]+)/update$', + subnet_views.UpdateView.as_view(), name='editsubnet'), + re_path(r'^(?P<network_id>[^/]+)/ports/(?P<port_id>[^/]+)/update$', + port_views.UpdateView.as_view(), name='editport'), + re_path(r'^subnets/', include((subnet_urls, 'subnets'))), + re_path(r'^ports/', include((port_urls, 'ports'))), ] diff --git a/openstack_dashboard/dashboards/project/overview/urls.py b/openstack_dashboard/dashboards/project/overview/urls.py index f70a94376..f0fd99485 100644 --- a/openstack_dashboard/dashboards/project/overview/urls.py +++ b/openstack_dashboard/dashboards/project/overview/urls.py @@ -16,12 +16,12 @@ # 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 openstack_dashboard.dashboards.project.overview import views urlpatterns = [ - url(r'^$', views.ProjectOverview.as_view(), name='index'), - url(r'^warning$', views.WarningView.as_view(), name='warning'), + re_path(r'^$', views.ProjectOverview.as_view(), name='index'), + re_path(r'^warning$', views.WarningView.as_view(), name='warning'), ] diff --git a/openstack_dashboard/dashboards/project/routers/ports/urls.py b/openstack_dashboard/dashboards/project/routers/ports/urls.py index 30904c00a..62d7215e9 100644 --- a/openstack_dashboard/dashboards/project/routers/ports/urls.py +++ b/openstack_dashboard/dashboards/project/routers/ports/urls.py @@ -12,12 +12,12 @@ # 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 openstack_dashboard.dashboards.project.routers.ports import views PORTS = r'^(?P<port_id>[^/]+)/%s$' urlpatterns = [ - url(PORTS % 'detail', views.DetailView.as_view(), name='detail'), + re_path(PORTS % 'detail', views.DetailView.as_view(), name='detail'), ] diff --git a/openstack_dashboard/dashboards/project/routers/urls.py b/openstack_dashboard/dashboards/project/routers/urls.py index 40ac695cd..53b1383c1 100644 --- a/openstack_dashboard/dashboards/project/routers/urls.py +++ b/openstack_dashboard/dashboards/project/routers/urls.py @@ -12,7 +12,7 @@ # 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 openstack_dashboard.dashboards.project.routers.extensions.extraroutes\ import views as er_views @@ -25,21 +25,21 @@ ROUTER_URL = r'^(?P<router_id>[^/]+)/%s' urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(ROUTER_URL % '$', - views.DetailView.as_view(), - name='detail'), - url(ROUTER_URL % 'update', - views.UpdateView.as_view(), - name='update'), - url(ROUTER_URL % 'addinterface', - port_views.AddInterfaceView.as_view(), - name='addinterface'), - url(ROUTER_URL % 'addrouterroute', - er_views.AddRouterRouteView.as_view(), - name='addrouterroute'), - url(ROUTER_URL % 'setgateway', - port_views.SetGatewayView.as_view(), - name='setgateway'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(ROUTER_URL % '$', + views.DetailView.as_view(), + name='detail'), + re_path(ROUTER_URL % 'update', + views.UpdateView.as_view(), + name='update'), + re_path(ROUTER_URL % 'addinterface', + port_views.AddInterfaceView.as_view(), + name='addinterface'), + re_path(ROUTER_URL % 'addrouterroute', + er_views.AddRouterRouteView.as_view(), + name='addrouterroute'), + re_path(ROUTER_URL % 'setgateway', + port_views.SetGatewayView.as_view(), + name='setgateway'), ] diff --git a/openstack_dashboard/dashboards/project/security_groups/urls.py b/openstack_dashboard/dashboards/project/security_groups/urls.py index fc1e77a2d..4aa1f6161 100644 --- a/openstack_dashboard/dashboards/project/security_groups/urls.py +++ b/openstack_dashboard/dashboards/project/security_groups/urls.py @@ -16,20 +16,20 @@ # 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 openstack_dashboard.dashboards.project.security_groups import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(r'^(?P<security_group_id>[^/]+)/$', - views.DetailView.as_view(), - name='detail'), - url(r'^(?P<security_group_id>[^/]+)/add_rule/$', - views.AddRuleView.as_view(), - name='add_rule'), - url(r'^(?P<security_group_id>[^/]+)/update/$', - views.UpdateView.as_view(), - name='update') + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(r'^(?P<security_group_id>[^/]+)/$', + views.DetailView.as_view(), + name='detail'), + re_path(r'^(?P<security_group_id>[^/]+)/add_rule/$', + views.AddRuleView.as_view(), + name='add_rule'), + re_path(r'^(?P<security_group_id>[^/]+)/update/$', + views.UpdateView.as_view(), + name='update') ] diff --git a/openstack_dashboard/dashboards/project/server_groups/urls.py b/openstack_dashboard/dashboards/project/server_groups/urls.py index fb489abec..1b65e2e3d 100644 --- a/openstack_dashboard/dashboards/project/server_groups/urls.py +++ b/openstack_dashboard/dashboards/project/server_groups/urls.py @@ -10,7 +10,7 @@ # 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 gettext_lazy as _ from horizon.browsers import views @@ -18,5 +18,5 @@ from horizon.browsers import views title = _("Server Groups") urlpatterns = [ - url(r'^$', views.AngularIndexView.as_view(title=title), name='index'), + re_path(r'^$', views.AngularIndexView.as_view(title=title), name='index'), ] diff --git a/openstack_dashboard/dashboards/project/snapshots/urls.py b/openstack_dashboard/dashboards/project/snapshots/urls.py index 2f0ed0c61..961ca03fc 100644 --- a/openstack_dashboard/dashboards/project/snapshots/urls.py +++ b/openstack_dashboard/dashboards/project/snapshots/urls.py @@ -10,17 +10,17 @@ # 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 openstack_dashboard.dashboards.project.snapshots import views urlpatterns = [ - url(r'^$', views.SnapshotsView.as_view(), name='index'), - url(r'^(?P<snapshot_id>[^/]+)$', - views.DetailView.as_view(), - name='detail'), - url(r'^(?P<snapshot_id>[^/]+)/update/$', - views.UpdateView.as_view(), - name='update'), + re_path(r'^$', views.SnapshotsView.as_view(), name='index'), + re_path(r'^(?P<snapshot_id>[^/]+)$', + views.DetailView.as_view(), + name='detail'), + re_path(r'^(?P<snapshot_id>[^/]+)/update/$', + views.UpdateView.as_view(), + name='update'), ] diff --git a/openstack_dashboard/dashboards/project/trunks/urls.py b/openstack_dashboard/dashboards/project/trunks/urls.py index cb49c9829..8b460d6fb 100644 --- a/openstack_dashboard/dashboards/project/trunks/urls.py +++ b/openstack_dashboard/dashboards/project/trunks/urls.py @@ -12,7 +12,7 @@ # 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 gettext_lazy as _ from horizon.browsers.views import AngularIndexView @@ -20,7 +20,7 @@ from horizon.browsers.views import AngularIndexView title = _("Trunks") urlpatterns = [ - url(r'^$', AngularIndexView.as_view(title=title), name='index'), - url(r'^(?P<trunk_id>[^/]+)/$', AngularIndexView.as_view(title=title), - name='detail'), + re_path(r'^$', AngularIndexView.as_view(title=title), name='index'), + re_path(r'^(?P<trunk_id>[^/]+)/$', AngularIndexView.as_view(title=title), + name='detail'), ] diff --git a/openstack_dashboard/dashboards/project/vg_snapshots/urls.py b/openstack_dashboard/dashboards/project/vg_snapshots/urls.py index 859547ffa..b969093bc 100644 --- a/openstack_dashboard/dashboards/project/vg_snapshots/urls.py +++ b/openstack_dashboard/dashboards/project/vg_snapshots/urls.py @@ -10,16 +10,16 @@ # 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 openstack_dashboard.dashboards.project.vg_snapshots import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^(?P<vg_snapshot_id>[^/]+)/detail/$', - views.DetailView.as_view(), - name='detail'), - url(r'^(?P<vg_snapshot_id>[^/]+)/create_group/$', - views.CreateGroupView.as_view(), - name='create_group'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^(?P<vg_snapshot_id>[^/]+)/detail/$', + views.DetailView.as_view(), + name='detail'), + re_path(r'^(?P<vg_snapshot_id>[^/]+)/create_group/$', + views.CreateGroupView.as_view(), + name='create_group'), ] diff --git a/openstack_dashboard/dashboards/project/volume_groups/urls.py b/openstack_dashboard/dashboards/project/volume_groups/urls.py index 2ffdff972..cf035f8a8 100644 --- a/openstack_dashboard/dashboards/project/volume_groups/urls.py +++ b/openstack_dashboard/dashboards/project/volume_groups/urls.py @@ -10,35 +10,35 @@ # 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 openstack_dashboard.dashboards.project.volume_groups import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), - url(r'^(?P<group_id>[^/]+)$', - views.DetailView.as_view(), - name='detail'), - url(r'^create/$', - views.CreateView.as_view(), - name='create'), - url(r'^(?P<group_id>[^/]+)/update/$', - views.UpdateView.as_view(), - name='update'), - url(r'^(?P<group_id>[^/]+)/remove_volumese/$', - views.RemoveVolumesView.as_view(), - name='remove_volumes'), - url(r'^(?P<group_id>[^/]+)/delete/$', - views.DeleteView.as_view(), - name='delete'), - url(r'^(?P<group_id>[^/]+)/manage/$', - views.ManageView.as_view(), - name='manage'), - url(r'^(?P<group_id>[^/]+)/create_snapshot/$', - views.CreateSnapshotView.as_view(), - name='create_snapshot'), - url(r'^(?P<group_id>[^/]+)/clone_group/$', - views.CloneGroupView.as_view(), - name='clone_group'), + re_path(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^(?P<group_id>[^/]+)$', + views.DetailView.as_view(), + name='detail'), + re_path(r'^create/$', + views.CreateView.as_view(), + name='create'), + re_path(r'^(?P<group_id>[^/]+)/update/$', + views.UpdateView.as_view(), + name='update'), + re_path(r'^(?P<group_id>[^/]+)/remove_volumese/$', + views.RemoveVolumesView.as_view(), + name='remove_volumes'), + re_path(r'^(?P<group_id>[^/]+)/delete/$', + views.DeleteView.as_view(), + name='delete'), + re_path(r'^(?P<group_id>[^/]+)/manage/$', + views.ManageView.as_view(), + name='manage'), + re_path(r'^(?P<group_id>[^/]+)/create_snapshot/$', + views.CreateSnapshotView.as_view(), + name='create_snapshot'), + re_path(r'^(?P<group_id>[^/]+)/clone_group/$', + views.CloneGroupView.as_view(), + name='clone_group'), ] diff --git a/openstack_dashboard/dashboards/project/volumes/urls.py b/openstack_dashboard/dashboards/project/volumes/urls.py index 98bbd61e9..47555bf49 100644 --- a/openstack_dashboard/dashboards/project/volumes/urls.py +++ b/openstack_dashboard/dashboards/project/volumes/urls.py @@ -12,58 +12,58 @@ # 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 openstack_dashboard.dashboards.project.backups \ import views as backup_views from openstack_dashboard.dashboards.project.volumes import views urlpatterns = [ - url(r'^$', views.VolumesView.as_view(), name='index'), - url(r'^create/$', views.CreateView.as_view(), name='create'), - url(r'^(?P<volume_id>[^/]+)/extend/$', - views.ExtendView.as_view(), - name='extend'), - url(r'^(?P<volume_id>[^/]+)/attach/$', - views.EditAttachmentsView.as_view(), - name='attach'), - url(r'^(?P<volume_id>[^/]+)/create_snapshot/$', - views.CreateSnapshotView.as_view(), - name='create_snapshot'), - url(r'^(?P<volume_id>[^/]+)/create_transfer/$', - views.CreateTransferView.as_view(), - name='create_transfer'), - url(r'^accept_transfer/$', - views.AcceptTransferView.as_view(), - name='accept_transfer'), - url(r'^(?P<transfer_id>[^/]+)/auth/(?P<auth_key>[^/]+)/$', - views.ShowTransferView.as_view(), - name='show_transfer'), - url(r'^(?P<volume_id>[^/]+)/create_backup/$', - backup_views.CreateBackupView.as_view(), - name='create_backup'), - url(r'^(?P<volume_id>[^/]+)/create_backup/(?P<snapshot_id>[^/]+)$', - backup_views.CreateBackupView.as_view(), - name='create_snapshot_backup'), - url(r'^(?P<volume_id>[^/]+)/$', - views.DetailView.as_view(), - name='detail'), - url(r'^(?P<volume_id>[^/]+)/\?tab=volume_details__snapshots_tab$', - views.DetailView.as_view(), - name='snapshots_tab'), - url(r'^(?P<volume_id>[^/]+)/upload_to_image/$', - views.UploadToImageView.as_view(), - name='upload_to_image'), - url(r'^(?P<volume_id>[^/]+)/update/$', - views.UpdateView.as_view(), - name='update'), - url(r'^(?P<volume_id>[^/]+)/retype/$', - views.RetypeView.as_view(), - name='retype'), - url(r'^(?P<volume_id>[^/]+)/encryption_detail/$', - views.EncryptionDetailView.as_view(), - name='encryption_detail'), - url(r'^(?P<transfer_id>[^/]+)/download_creds/(?P<auth_key>[^/]+)$', - views.DownloadTransferCreds.as_view(), - name='download_transfer_creds'), + re_path(r'^$', views.VolumesView.as_view(), name='index'), + re_path(r'^create/$', views.CreateView.as_view(), name='create'), + re_path(r'^(?P<volume_id>[^/]+)/extend/$', + views.ExtendView.as_view(), + name='extend'), + re_path(r'^(?P<volume_id>[^/]+)/attach/$', + views.EditAttachmentsView.as_view(), + name='attach'), + re_path(r'^(?P<volume_id>[^/]+)/create_snapshot/$', + views.CreateSnapshotView.as_view(), + name='create_snapshot'), + re_path(r'^(?P<volume_id>[^/]+)/create_transfer/$', + views.CreateTransferView.as_view(), + name='create_transfer'), + re_path(r'^accept_transfer/$', + views.AcceptTransferView.as_view(), + name='accept_transfer'), + re_path(r'^(?P<transfer_id>[^/]+)/auth/(?P<auth_key>[^/]+)/$', + views.ShowTransferView.as_view(), + name='show_transfer'), + re_path(r'^(?P<volume_id>[^/]+)/create_backup/$', + backup_views.CreateBackupView.as_view(), + name='create_backup'), + re_path(r'^(?P<volume_id>[^/]+)/create_backup/(?P<snapshot_id>[^/]+)$', + backup_views.CreateBackupView.as_view(), + name='create_snapshot_backup'), + re_path(r'^(?P<volume_id>[^/]+)/$', + views.DetailView.as_view(), + name='detail'), + re_path(r'^(?P<volume_id>[^/]+)/\?tab=volume_details__snapshots_tab$', + views.DetailView.as_view(), + name='snapshots_tab'), + re_path(r'^(?P<volume_id>[^/]+)/upload_to_image/$', + views.UploadToImageView.as_view(), + name='upload_to_image'), + re_path(r'^(?P<volume_id>[^/]+)/update/$', + views.UpdateView.as_view(), + name='update'), + re_path(r'^(?P<volume_id>[^/]+)/retype/$', + views.RetypeView.as_view(), + name='retype'), + re_path(r'^(?P<volume_id>[^/]+)/encryption_detail/$', + views.EncryptionDetailView.as_view(), + name='encryption_detail'), + re_path(r'^(?P<transfer_id>[^/]+)/download_creds/(?P<auth_key>[^/]+)$', + views.DownloadTransferCreds.as_view(), + name='download_transfer_creds'), ] diff --git a/openstack_dashboard/dashboards/settings/password/urls.py b/openstack_dashboard/dashboards/settings/password/urls.py index 2b74d544a..cc1a66600 100644 --- a/openstack_dashboard/dashboards/settings/password/urls.py +++ b/openstack_dashboard/dashboards/settings/password/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 openstack_dashboard.dashboards.settings.password import views urlpatterns = [ - url(r'^$', views.PasswordView.as_view(), name='index'), + re_path(r'^$', views.PasswordView.as_view(), name='index'), ] diff --git a/openstack_dashboard/dashboards/settings/user/urls.py b/openstack_dashboard/dashboards/settings/user/urls.py index 1dd775364..d5e133324 100644 --- a/openstack_dashboard/dashboards/settings/user/urls.py +++ b/openstack_dashboard/dashboards/settings/user/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 openstack_dashboard.dashboards.settings.user import views urlpatterns = [ - url(r'^$', views.UserSettingsView.as_view(), name='index'), + re_path(r'^$', views.UserSettingsView.as_view(), name='index'), ] diff --git a/openstack_dashboard/test/error_pages_urls.py b/openstack_dashboard/test/error_pages_urls.py index 5f2b9f3c4..f871fcab4 100644 --- a/openstack_dashboard/test/error_pages_urls.py +++ b/openstack_dashboard/test/error_pages_urls.py @@ -10,9 +10,9 @@ # 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.views import defaults from openstack_dashboard.urls import urlpatterns -urlpatterns.append(url(r'^500/$', defaults.server_error)) +urlpatterns.append(re_path(r'^500/$', defaults.server_error)) diff --git a/openstack_dashboard/test/extensible_header_urls.py b/openstack_dashboard/test/extensible_header_urls.py index fb481b00a..a6ee90fc3 100644 --- a/openstack_dashboard/test/extensible_header_urls.py +++ b/openstack_dashboard/test/extensible_header_urls.py @@ -10,9 +10,9 @@ # 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 openstack_dashboard.urls import urlpatterns # noqa from openstack_dashboard import views -urlpatterns.append(url(r'^header/', views.ExtensibleHeaderView.as_view())) +urlpatterns.append(re_path(r'^header/', views.ExtensibleHeaderView.as_view())) diff --git a/openstack_dashboard/test/test_panels/another_panel/urls.py b/openstack_dashboard/test/test_panels/another_panel/urls.py index f3f16d85c..609178b2a 100644 --- a/openstack_dashboard/test/test_panels/another_panel/urls.py +++ b/openstack_dashboard/test/test_panels/another_panel/urls.py @@ -10,10 +10,10 @@ # 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 openstack_dashboard.test.test_panels.another_panel import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/openstack_dashboard/test/test_panels/nonloading_panel/urls.py b/openstack_dashboard/test/test_panels/nonloading_panel/urls.py index dbfbf5111..1fdd6dc9a 100644 --- a/openstack_dashboard/test/test_panels/nonloading_panel/urls.py +++ b/openstack_dashboard/test/test_panels/nonloading_panel/urls.py @@ -10,10 +10,10 @@ # 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 openstack_dashboard.test.test_panels.nonloading_panel import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/openstack_dashboard/test/test_panels/plugin_panel/urls.py b/openstack_dashboard/test/test_panels/plugin_panel/urls.py index 848017c7d..67d1a2f26 100644 --- a/openstack_dashboard/test/test_panels/plugin_panel/urls.py +++ b/openstack_dashboard/test/test_panels/plugin_panel/urls.py @@ -10,10 +10,10 @@ # 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 openstack_dashboard.test.test_panels.plugin_panel import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/openstack_dashboard/test/test_panels/second_panel/urls.py b/openstack_dashboard/test/test_panels/second_panel/urls.py index 709b66b32..3335e3545 100644 --- a/openstack_dashboard/test/test_panels/second_panel/urls.py +++ b/openstack_dashboard/test/test_panels/second_panel/urls.py @@ -10,10 +10,10 @@ # 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 openstack_dashboard.test.test_panels.second_panel import views urlpatterns = [ - url(r'^$', views.IndexView.as_view(), name='index'), + re_path(r'^$', views.IndexView.as_view(), name='index'), ] diff --git a/openstack_dashboard/test/urls.py b/openstack_dashboard/test/urls.py index 48b262a3b..2c6c06513 100644 --- a/openstack_dashboard/test/urls.py +++ b/openstack_dashboard/test/urls.py @@ -20,8 +20,8 @@ URL patterns for the OpenStack Dashboard. from django.conf import settings from django.conf.urls import include from django.conf.urls.static import static -from django.conf.urls import url from django.contrib.staticfiles.urls import staticfiles_urlpatterns +from django.urls import re_path from django.views import defaults import horizon.base @@ -34,14 +34,14 @@ from openstack_dashboard import views import horizon urlpatterns = [ - url(r'^$', views.splash, name='splash'), - url(r'^auth/', include('openstack_auth.urls')), - url(r'^api/', include(rest.urls)), - url(r'^jasmine/(.*?)$', jasmine.dispatcher), - url(r'', horizon.base._wrapped_include(horizon.urls)), - url(r'^ngdetails/', - browsers_views.AngularDetailsView.as_view(), - name='ngdetails'), + re_path(r'^$', views.splash, name='splash'), + re_path(r'^auth/', include('openstack_auth.urls')), + re_path(r'^api/', include(rest.urls)), + re_path(r'^jasmine/(.*?)$', jasmine.dispatcher), + re_path(r'', horizon.base._wrapped_include(horizon.urls)), + re_path(r'^ngdetails/', + browsers_views.AngularDetailsView.as_view(), + name='ngdetails'), ] # Development static app and project media serving using the staticfiles app. @@ -53,4 +53,4 @@ urlpatterns += staticfiles_urlpatterns() urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: - urlpatterns.append(url(r'^500/$', defaults.server_error)) + urlpatterns.append(re_path(r'^500/$', defaults.server_error)) diff --git a/openstack_dashboard/urls.py b/openstack_dashboard/urls.py index 09a309bce..c376d16c6 100644 --- a/openstack_dashboard/urls.py +++ b/openstack_dashboard/urls.py @@ -23,8 +23,8 @@ URL patterns for the OpenStack Dashboard. from django.conf import settings from django.conf.urls import include from django.conf.urls.static import static -from django.conf.urls import url from django.contrib.staticfiles.urls import staticfiles_urlpatterns +from django.urls import re_path from django.views import defaults import horizon @@ -36,21 +36,21 @@ from openstack_dashboard.api import rest from openstack_dashboard import views urlpatterns = [ - url(r'^$', views.splash, name='splash'), - url(r'^api/', include(rest.urls)), - url(r'^header/', views.ExtensibleHeaderView.as_view()), - url(r'', horizon.base._wrapped_include(horizon.urls)), + re_path(r'^$', views.splash, name='splash'), + re_path(r'^api/', include(rest.urls)), + re_path(r'^header/', views.ExtensibleHeaderView.as_view()), + re_path(r'', horizon.base._wrapped_include(horizon.urls)), ] # add URL for ngdetails -ngdetails_url = url(r'^ngdetails/', - browsers_views.AngularDetailsView.as_view(), - name='ngdetails') +ngdetails_url = re_path(r'^ngdetails/', + browsers_views.AngularDetailsView.as_view(), + name='ngdetails') urlpatterns.append(ngdetails_url) horizon.base._decorate_urlconf([ngdetails_url], require_auth) for u in settings.AUTHENTICATION_URLS: - urlpatterns.append(url(r'^auth/', include(u))) + urlpatterns.append(re_path(r'^auth/', include(u))) # Development static app and project media serving using the staticfiles app. urlpatterns += staticfiles_urlpatterns() @@ -61,4 +61,4 @@ urlpatterns += staticfiles_urlpatterns() urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: - urlpatterns.append(url(r'^500/$', defaults.server_error)) + urlpatterns.append(re_path(r'^500/$', defaults.server_error)) |