From 101eeecf9a562c544a27c08d988f58658b8bc2b4 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Wed, 2 Dec 2015 21:46:14 -0500 Subject: finished cleaning up all the warnings for depricated features in django 1.10. I like to be ready yo. --- config/base_urls.py | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) (limited to 'config') diff --git a/config/base_urls.py b/config/base_urls.py index d67afe2..9104d6e 100644 --- a/config/base_urls.py +++ b/config/base_urls.py @@ -1,12 +1,14 @@ -from django.conf.urls import * +from django.conf.urls import url, include from django.contrib import admin -from django.views.generic import TemplateView from django.views import static from django.conf import settings +from django.contrib.sitemaps.views import sitemap +from pages.views import page from jrnl.models import BlogSitemap from jrnl.views import HomepageList from locations.models import WritingbyCountrySitemap +from locations.views import map_data from photos.models import PhotoGallerySitemap from src.models import SrcSitemap from figments.models import FigmentSitemap @@ -25,32 +27,23 @@ sitemaps = { } urlpatterns = [ - (r'^projects/data/natparks/(?P.*)$', 'django.views.static.serve', {'document_root': settings.PROJ_ROOT + 'site/projects/data/natparks/'}), - (r'^media/js/mainmap.js$', 'locations.views.map_data'), - (r'^media/admin/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT + '/admin'}), - (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), + url(r'^projects/data/natparks/(?P.*)$', static.serve, {'document_root': settings.PROJ_ROOT + 'site/projects/data/natparks/'}), + url(r'^media/js/mainmap.js$', map_data), + url(r'^media/admin/(?P.*)$', static.serve, {'document_root': settings.MEDIA_ROOT + '/admin'}), + url(r'^media/(?P.*)$', static.serve, {'document_root': settings.MEDIA_ROOT}), ] urlpatterns += [ url(r'^admin/build/.*', builder.views.do_build), url(r'^admin/', include(admin.site.urls),), - url(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}), + url(r'^sitemap.xml$', sitemap, {'sitemaps': sitemaps}), url(r'^links/', include('links.urls')), url(r'^jrnl/', include('jrnl.urls')), url(r'^projects/', include('projects.urls')), - url( - r'^locations/', - include('locations.urls') - ), - url( - r'^expenses/', - include('expenses.urls', namespace='expenses') - ), - (r'^photos/', include('photos.urls')), - url( - r'^books/', - include('books.urls', namespace='books') - ), + url(r'^locations/', include('locations.urls')), + url(r'^expenses/', include('expenses.urls', namespace='expenses')), + url(r'^photos/', include('photos.urls')), + url(r'^books/', include('books.urls')), url( r'^field-notes/', include('notes.urls', namespace='notes') @@ -80,7 +73,7 @@ urlpatterns += [ name="homepage" ), # pages - url(r'^(?P[-\w]+)/?$', 'pages.views.page'), + url(r'^(?P[-\w]+)/?$', page), ] urlpatterns += [ @@ -91,5 +84,5 @@ urlpatterns += [ ), ] urlpatterns += [ - (r'^comments/', include('django_comments.urls')), + url(r'^comments/', include('django_comments.urls')), ] -- cgit v1.2.3-70-g09d2