From d2aba6fc9b602ec53fc143ada731cee9dc7ad531 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Tue, 15 Oct 2019 23:04:25 +0200 Subject: [PATCH] Url migrations for django 1.11 --- bgpdata/urls.py | 19 ++++++++++--------- dnmapper/urls.py | 4 ++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bgpdata/urls.py b/bgpdata/urls.py index 6d461d2..03508ec 100644 --- a/bgpdata/urls.py +++ b/bgpdata/urls.py @@ -2,24 +2,25 @@ # Licensed under GNU General Public License v3 or later # Written by Sebastian Lohff (seba@someserver.de) -from django.conf.urls import patterns, url, include -#from django.views.generic import RedirectView +from django.conf.urls import url, include + from api import ASResource, CrawlResource, BorderRouterResource, AnnouncementResource +from bgpdata import views as bgpdata_views asResource = ASResource() crawlResource = CrawlResource() borderRouterResource = BorderRouterResource() announcementResource = AnnouncementResource() -urlpatterns = patterns('', - url(r'^$', 'bgpdata.views.overview'), - url(r'^([0-9]+)/$', 'bgpdata.views.showMap'), +urlpatterns = ( + url(r'^$', bgpdata_views.overview), + url(r'^([0-9]+)/$', bgpdata_views.showMap), #url(r'^api/crawl/(?P\d+)/asses/$', 'bgpdata.api.asses'), #(r'^api/', include(asResource.urls)), - (r'^api/', include(asResource.urls)), - (r'^api/', include(crawlResource.urls)), - (r'^api/', include(borderRouterResource.urls)), - (r'^api/', include(announcementResource.urls)), + url(r'^api/', include(asResource.urls)), + url(r'^api/', include(crawlResource.urls)), + url(r'^api/', include(borderRouterResource.urls)), + url(r'^api/', include(announcementResource.urls)), ) diff --git a/dnmapper/urls.py b/dnmapper/urls.py index 442e02c..dd801b3 100644 --- a/dnmapper/urls.py +++ b/dnmapper/urls.py @@ -2,12 +2,12 @@ # Licensed under GNU General Public License v3 or later # Written by Sebastian Lohff (seba@someserver.de) -from django.conf.urls import patterns, include, url +from django.conf.urls import include, url from django.contrib import admin from django.views.generic import RedirectView import bgpdata.urls -urlpatterns = patterns('', +urlpatterns = ( # Examples: # url(r'^$', 'dnmapper.views.home', name='home'), # url(r'^blog/', include('blog.urls')),