Browse Source

Url migrations for django 1.11

Sebastian Lohff 7 months ago
parent
commit
d2aba6fc9b
2 changed files with 12 additions and 11 deletions
  1. 10
    9
      bgpdata/urls.py
  2. 2
    2
      dnmapper/urls.py

+ 10
- 9
bgpdata/urls.py View File

@@ -2,24 +2,25 @@
2 2
 # Licensed under GNU General Public License v3 or later
3 3
 # Written by Sebastian Lohff (seba@someserver.de)
4 4
 
5
-from django.conf.urls import patterns, url, include
6
-#from django.views.generic import RedirectView
5
+from django.conf.urls import url, include
6
+
7 7
 from api import ASResource, CrawlResource, BorderRouterResource, AnnouncementResource
8
+from bgpdata import views as bgpdata_views
8 9
 
9 10
 asResource = ASResource()
10 11
 crawlResource = CrawlResource()
11 12
 borderRouterResource = BorderRouterResource()
12 13
 announcementResource = AnnouncementResource()
13 14
 
14
-urlpatterns = patterns('',
15
-	url(r'^$', 'bgpdata.views.overview'),
16
-	url(r'^([0-9]+)/$', 'bgpdata.views.showMap'),
15
+urlpatterns = (
16
+	url(r'^$', bgpdata_views.overview),
17
+	url(r'^([0-9]+)/$', bgpdata_views.showMap),
17 18
 
18 19
 	#url(r'^api/crawl/(?P<crawlID>\d+)/asses/$', 'bgpdata.api.asses'),
19 20
 	#(r'^api/', include(asResource.urls)),
20
-	(r'^api/', include(asResource.urls)),
21
-	(r'^api/', include(crawlResource.urls)),
22
-	(r'^api/', include(borderRouterResource.urls)),
23
-	(r'^api/', include(announcementResource.urls)),
21
+	url(r'^api/', include(asResource.urls)),
22
+	url(r'^api/', include(crawlResource.urls)),
23
+	url(r'^api/', include(borderRouterResource.urls)),
24
+	url(r'^api/', include(announcementResource.urls)),
24 25
 )
25 26
 

+ 2
- 2
dnmapper/urls.py View File

@@ -2,12 +2,12 @@
2 2
 # Licensed under GNU General Public License v3 or later
3 3
 # Written by Sebastian Lohff (seba@someserver.de)
4 4
 
5
-from django.conf.urls import patterns, include, url
5
+from django.conf.urls import include, url
6 6
 from django.contrib import admin
7 7
 from django.views.generic import RedirectView
8 8
 import bgpdata.urls
9 9
 
10
-urlpatterns = patterns('',
10
+urlpatterns = (
11 11
     # Examples:
12 12
     # url(r'^$', 'dnmapper.views.home', name='home'),
13 13
     # url(r'^blog/', include('blog.urls')),

Loading…
Cancel
Save