Update URLs to Django 1.8 style

django.conf.urls.patterns() is deprecated since 1.8.
We should not use patterns(), so this patch updates URLs to
1.8 style.

Change-Id: I4192217356aa45ca7ba545985380820c5960382d
Closes-Bug: #1539354
This commit is contained in:
shu-mutou 2016-01-29 19:01:45 +09:00
parent b76ee98ab3
commit 676b571313
6 changed files with 12 additions and 23 deletions

View File

@ -10,16 +10,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf.urls import patterns # noqa
from django.conf.urls import url # noqa
from senlin_dashboard.cluster.clusters import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<cluster_id>[^/]+)/$',
views.DetailView.as_view(), name='detail'),
)
]

View File

@ -10,16 +10,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf.urls import patterns # noqa
from django.conf.urls import url # noqa
from senlin_dashboard.cluster.nodes import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<node_id>[^/]+)/$',
views.DetailView.as_view(), name='detail'),
)
]

View File

@ -10,16 +10,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf.urls import patterns # noqa
from django.conf.urls import url # noqa
from senlin_dashboard.cluster.policies import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<policy_id>[^/]+)/$',
views.DetailView.as_view(), name='detail'),
)
]

View File

@ -10,18 +10,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf.urls import patterns # noqa
from django.conf.urls import url # noqa
from senlin_dashboard.cluster.profiles import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<profile_id>[^/]+)/update/$',
views.UpdateView.as_view(), name='update'),
url(r'^(?P<profile_id>[^/]+)/$',
views.DetailView.as_view(), name='detail'),
)
]

View File

@ -10,16 +10,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from django.conf.urls import patterns # noqa
from django.conf.urls import url # noqa
from senlin_dashboard.cluster.receivers import views
urlpatterns = patterns(
'',
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^create/$', views.CreateView.as_view(), name='create'),
url(r'^(?P<receiver_id>[^/]+)/$',
views.DetailView.as_view(), name='detail'),
)
]

View File

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