Update urls to Django 1.8 style

django.conf.urls.patterns() is deprecated since 1.8
We cannot use patterns() anymore.

Change-Id: I2a84a1ec7aebcbc488ae668e3a076bf9d72b0acf
Closes-Bug: #1703225
This commit is contained in:
doantungbk 2017-07-09 10:04:10 -07:00
parent 6be8f80834
commit 6bdb8a4f91
8 changed files with 16 additions and 38 deletions

View File

@ -11,15 +11,12 @@
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from tacker_horizon.openstack_dashboard.dashboards.nfv.nscatalog import views
urlpatterns = patterns(
'tacker_horizon.openstack_dashboard.dashboards.nfv.nscatalog.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^onboardns', views.OnBoardNSView.as_view(), name='onboardns'),
url(r'^(?P<nsd_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
)
]

View File

@ -11,15 +11,12 @@
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from tacker_horizon.openstack_dashboard.dashboards.nfv.nsmanager import views
urlpatterns = patterns(
'tacker_horizon.openstack_dashboard.dashboards.nfv.nsmanager.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^deployns$', views.DeployNSView.as_view(), name='deployns'),
url(r'^(?P<ns_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
)
]

View File

@ -13,15 +13,12 @@
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from tacker_horizon.openstack_dashboard.dashboards.nfv.vim import views
urlpatterns = patterns(
'tacker_horizon.openstack_dashboard.dashboards.nfv.vim.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^registervim$', views.RegisterVIMView.as_view(), name='registervim'),
url(r'^(?P<vim_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
)
]

View File

@ -13,15 +13,12 @@
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfcatalog import views
urlpatterns = patterns(
'tacker_horizon.openstack_dashboard.dashboards.nfv.vnfcatalog.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^onboardvnf', views.OnBoardVNFView.as_view(), name='onboardvnf'),
url(r'^(?P<vnfd_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
)
]

View File

@ -11,17 +11,14 @@
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffgcatalog \
import views
urlpatterns = patterns(
'tacker_horizon.openstack_dashboard.dashboards.nfv.vnffgcatalog.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^onboardvnffg', views.OnBoardVNFFGView.as_view(),
name='onboardvnffg'),
url(r'^(?P<vnffgd_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
)
]

View File

@ -11,16 +11,13 @@
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from tacker_horizon.openstack_dashboard.dashboards.nfv.vnffgmanager \
import views
urlpatterns = patterns(
'tacker_horizon.openstack_dashboard.dashboards.nfv.vnffgmanager.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^deployvnffg$', views.DeployVNFFGView.as_view(), name='deployvnffg'),
url(r'^(?P<vnffg_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
)
]

View File

@ -13,15 +13,12 @@
# under the License.
from django.conf.urls import patterns
from django.conf.urls import url
from tacker_horizon.openstack_dashboard.dashboards.nfv.vnfmanager import views
urlpatterns = patterns(
'tacker_horizon.openstack_dashboard.dashboards.nfv.vnfmanager.views',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^deployvnf$', views.DeployVNFView.as_view(), name='deployvnf'),
url(r'^(?P<vnf_id>[^/]+)/$', views.DetailView.as_view(), name='detail'),
)
]

View File

@ -16,7 +16,6 @@ from django.conf import urls
import openstack_dashboard.urls
urlpatterns = urls.patterns(
'',
urlpatterns = [
urls.url(r'', urls.include(openstack_dashboard.urls))
)
]