From 955d6d76ebf754fbf94f1f8204b245d6f9b216aa Mon Sep 17 00:00:00 2001 From: Anusha Ramineni Date: Wed, 12 Jul 2017 10:51:48 +0530 Subject: [PATCH] Remove usage of patterns Usage of patterns in obsolete, so removing the same. Change-Id: I5199676041b91f419bacad1fd19e33004e442758 --- congress_dashboard/datasources/urls.py | 6 ++---- congress_dashboard/policies/urls.py | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/congress_dashboard/datasources/urls.py b/congress_dashboard/datasources/urls.py index 430afb6..84d8709 100644 --- a/congress_dashboard/datasources/urls.py +++ b/congress_dashboard/datasources/urls.py @@ -12,7 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from django.conf.urls import patterns from django.conf.urls import url from congress_dashboard.datasources import views @@ -23,8 +22,7 @@ SERVICES = ( DATASOURCE = r'^(?P[^/]+)/%s$' -urlpatterns = patterns( - '', +urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^create/$', views.CreateView.as_view(), name='create'), url(SERVICES % 'detail', views.DetailView.as_view(), @@ -32,4 +30,4 @@ urlpatterns = patterns( url(DATASOURCE % 'detail', views.DatasourceView.as_view(), name='datasource_detail'), -) +] diff --git a/congress_dashboard/policies/urls.py b/congress_dashboard/policies/urls.py index 05ff51c..0a7403d 100644 --- a/congress_dashboard/policies/urls.py +++ b/congress_dashboard/policies/urls.py @@ -12,7 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from django.conf.urls import patterns from django.conf.urls import url from congress_dashboard.datasources import views as data_views @@ -24,8 +23,7 @@ POLICY = r'^(?P[^/]+)/%s$' POLICYTABLE = r'^(?P[^/]+)/(?P[^/]+)/%s$' -urlpatterns = patterns( - '', +urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^create/$', views.CreateView.as_view(), name='create'), url(POLICY % 'detail', views.DetailView.as_view(), name='detail'), @@ -33,4 +31,4 @@ urlpatterns = patterns( name='policy_table_detail'), url(POLICY % 'rules/create', rule_views.CreateView.as_view(), name='create_rule'), -) +]