Url migrations for django 1.11

This commit is contained in:
Sebastian Lohff 2019-10-15 23:04:25 +02:00
parent 4d24a285f6
commit d2aba6fc9b
2 changed files with 12 additions and 11 deletions

View File

@ -2,24 +2,25 @@
# Licensed under GNU General Public License v3 or later # Licensed under GNU General Public License v3 or later
# Written by Sebastian Lohff (seba@someserver.de) # Written by Sebastian Lohff (seba@someserver.de)
from django.conf.urls import patterns, url, include from django.conf.urls import url, include
#from django.views.generic import RedirectView
from api import ASResource, CrawlResource, BorderRouterResource, AnnouncementResource from api import ASResource, CrawlResource, BorderRouterResource, AnnouncementResource
from bgpdata import views as bgpdata_views
asResource = ASResource() asResource = ASResource()
crawlResource = CrawlResource() crawlResource = CrawlResource()
borderRouterResource = BorderRouterResource() borderRouterResource = BorderRouterResource()
announcementResource = AnnouncementResource() announcementResource = AnnouncementResource()
urlpatterns = patterns('', urlpatterns = (
url(r'^$', 'bgpdata.views.overview'), url(r'^$', bgpdata_views.overview),
url(r'^([0-9]+)/$', 'bgpdata.views.showMap'), url(r'^([0-9]+)/$', bgpdata_views.showMap),
#url(r'^api/crawl/(?P<crawlID>\d+)/asses/$', 'bgpdata.api.asses'), #url(r'^api/crawl/(?P<crawlID>\d+)/asses/$', 'bgpdata.api.asses'),
#(r'^api/', include(asResource.urls)), #(r'^api/', include(asResource.urls)),
(r'^api/', include(asResource.urls)), url(r'^api/', include(asResource.urls)),
(r'^api/', include(crawlResource.urls)), url(r'^api/', include(crawlResource.urls)),
(r'^api/', include(borderRouterResource.urls)), url(r'^api/', include(borderRouterResource.urls)),
(r'^api/', include(announcementResource.urls)), url(r'^api/', include(announcementResource.urls)),
) )

View File

@ -2,12 +2,12 @@
# Licensed under GNU General Public License v3 or later # Licensed under GNU General Public License v3 or later
# Written by Sebastian Lohff (seba@someserver.de) # 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.contrib import admin
from django.views.generic import RedirectView from django.views.generic import RedirectView
import bgpdata.urls import bgpdata.urls
urlpatterns = patterns('', urlpatterns = (
# Examples: # Examples:
# url(r'^$', 'dnmapper.views.home', name='home'), # url(r'^$', 'dnmapper.views.home', name='home'),
# url(r'^blog/', include('blog.urls')), # url(r'^blog/', include('blog.urls')),