Address RemovedInDjango40Warning

In Django 3.1, django.conf.urls.url() is deprecated
in favor of django.urls.re_path(). For more info see [1]
These were already replaced in Horizon repo by [2].
[1] https://docs.djangoproject.com/en/4.0/releases/3.1/#id2
[2] https://review.opendev.org/c/openstack/horizon/+/827093
Change-Id: Id90e65ce8ad132b4518e3f979b4d7ad8917ce267
This commit is contained in:
manchandavishal
2022年04月29日 22:24:11 +05:30
parent 9f78f6e393
commit d44be7d590

View File

@@ -13,22 +13,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
import bgpvpn_dashboard.dashboards.admin.bgpvpn.views as bgpvpn_views
BGPVPN = r'^(?P<bgpvpn_id>[^/]+)/%s$'
urlpatterns = [
url(r'^$', bgpvpn_views.IndexView.as_view(), name='index'),
url(r'^create/$', bgpvpn_views.CreateView.as_view(), name='create'),
url(BGPVPN % 'edit', bgpvpn_views.EditDataView.as_view(), name='edit'),
url(BGPVPN % 'create-network-association',
bgpvpn_views.CreateNetworkAssociationView.as_view(),
name='create-network-association'),
url(BGPVPN % 'create-router-association',
bgpvpn_views.CreateRouterAssociationView.as_view(),
name='create-router-association'),
url(r'^(?P<bgpvpn_id>[^/]+)/detail/$',
bgpvpn_views.DetailProjectView.as_view(), name='detail'),
re_path(r'^$', bgpvpn_views.IndexView.as_view(), name='index'),
re_path(r'^create/$', bgpvpn_views.CreateView.as_view(), name='create'),
re_path(BGPVPN % 'edit', bgpvpn_views.EditDataView.as_view(),
name='edit'),
re_path(BGPVPN % 'create-network-association',
bgpvpn_views.CreateNetworkAssociationView.as_view(),
name='create-network-association'),
re_path(BGPVPN % 'create-router-association',
bgpvpn_views.CreateRouterAssociationView.as_view(),
name='create-router-association'),
re_path(r'^(?P<bgpvpn_id>[^/]+)/detail/$',
bgpvpn_views.DetailProjectView.as_view(), name='detail'),
]

View File

@@ -13,7 +13,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 bgpvpn_dashboard.dashboards.project.bgpvpn.network_associations \
import views as bgpvpn_network_associations_views
@@ -22,6 +22,7 @@ NETWORK_ASSO = r'^(?P<bgpvpn_id>[^/]+)/network_assos/' \
r'(?P<network_association_id>[^/]+)/%s$'
urlpatterns = [
url(NETWORK_ASSO % 'detail',
bgpvpn_network_associations_views.DetailView.as_view(), name='detail'),
re_path(NETWORK_ASSO % 'detail',
bgpvpn_network_associations_views.DetailView.as_view(),
name='detail'),
]

View File

@@ -13,7 +13,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
import bgpvpn_dashboard.dashboards.project.bgpvpn.router_associations.views \
as bgpvpn_router_associations_views
@@ -22,6 +22,7 @@ ROUTER_ASSO = r'^(?P<bgpvpn_id>[^/]+)/router_assos/' \
r'(?P<router_association_id>[^/]+)/%s$'
urlpatterns = [
url(ROUTER_ASSO % 'detail',
bgpvpn_router_associations_views.DetailView.as_view(), name='detail'),
re_path(ROUTER_ASSO % 'detail',
bgpvpn_router_associations_views.DetailView.as_view(),
name='detail'),
]

View File

@@ -14,7 +14,7 @@
# under the License.
from django.conf.urls import include
from django.conf.urls import url
from django.urls import re_path
from bgpvpn_dashboard.dashboards.project.bgpvpn.network_associations import \
urls as network_associations_urls
@@ -29,31 +29,34 @@ from bgpvpn_dashboard.dashboards.project.bgpvpn import views as bgpvpn_views
BGPVPN = r'^(?P<bgpvpn_id>[^/]+)/%s$'
urlpatterns = [
url(r'^$', bgpvpn_views.IndexView.as_view(), name='index'),
url(BGPVPN % 'edit', bgpvpn_views.EditDataView.as_view(), name='edit'),
url(BGPVPN % 'create-network-association',
bgpvpn_views.CreateNetworkAssociationView.as_view(),
name='create-network-association'),
url(BGPVPN % 'create-router-association',
bgpvpn_views.CreateRouterAssociationView.as_view(),
name='create-router-association'),
url(r'^(?P<bgpvpn_id>[^/]+)/detail/$',
bgpvpn_views.DetailProjectView.as_view(), name='detail'),
url(r'^(?P<bgpvpn_id>[^/]+)/network_assos/'
r'(?P<network__association_id>[^/]+)/'
r'detail\?tab=bgpvpns__network__associations_tab$',
network_associations_views.DetailView.as_view(),
name='network_associations_tab'),
url(r'^(?P<bgpvpn_id>[^/]+)/router_assos/(?P<router_association_id>[^/]+)/'
r'detail\?tab=bgpvpns__router_associations_tab$',
router_associations_views.DetailView.as_view(),
name='router_associations_tab'),
url(r'^(?P<bgpvpn_id>[^/]+)/router_assos/(?P<router_association_id>[^/]+)/'
r'update$',
router_associations_views.UpdateRouterAssociationsView.as_view(),
name='update-router-association'),
url(r'^network_assos/',
include((network_associations_urls, 'network_assos'))),
url(r'^router_assos/',
include((router_associations_urls, 'router_assos'))),
re_path(r'^$', bgpvpn_views.IndexView.as_view(), name='index'),
re_path(BGPVPN % 'edit', bgpvpn_views.EditDataView.as_view(),
name='edit'),
re_path(BGPVPN % 'create-network-association',
bgpvpn_views.CreateNetworkAssociationView.as_view(),
name='create-network-association'),
re_path(BGPVPN % 'create-router-association',
bgpvpn_views.CreateRouterAssociationView.as_view(),
name='create-router-association'),
re_path(r'^(?P<bgpvpn_id>[^/]+)/detail/$',
bgpvpn_views.DetailProjectView.as_view(), name='detail'),
re_path(r'^(?P<bgpvpn_id>[^/]+)/network_assos/'
r'(?P<network__association_id>[^/]+)/'
r'detail\?tab=bgpvpns__network__associations_tab$',
network_associations_views.DetailView.as_view(),
name='network_associations_tab'),
re_path(r'^(?P<bgpvpn_id>[^/]+)/router_assos/(?P<router_association_id>'
r'[^/]+)/'
r'detail\?tab=bgpvpns__router_associations_tab$',
router_associations_views.DetailView.as_view(),
name='router_associations_tab'),
re_path(r'^(?P<bgpvpn_id>[^/]+)/router_assos/(?P<router_association_id>'
r'[^/]+)/'
r'update$',
router_associations_views.UpdateRouterAssociationsView.as_view(),
name='update-router-association'),
re_path(r'^network_assos/',
include((network_associations_urls, 'network_assos'))),
re_path(r'^router_assos/',
include((router_associations_urls, 'router_assos'))),
]
Reference in New Issue
openstack/networking-bgpvpn
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.