diff options
author | luxagraf <sng@luxagraf.net> | 2015-12-02 21:46:14 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2015-12-02 21:46:14 -0500 |
commit | 101eeecf9a562c544a27c08d988f58658b8bc2b4 (patch) | |
tree | 47d2083134f6dc96d292e80cee4708ffc16c7cff /config | |
parent | 741cea88d882d8ac185121141ef49815835ad8a7 (diff) |
finished cleaning up all the warnings for depricated features in django
1.10. I like to be ready yo.
Diffstat (limited to 'config')
-rw-r--r-- | config/base_urls.py | 37 |
1 files changed, 15 insertions, 22 deletions
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<path>.*)$', '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<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT + '/admin'}), - (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), + url(r'^projects/data/natparks/(?P<path>.*)$', static.serve, {'document_root': settings.PROJ_ROOT + 'site/projects/data/natparks/'}), + url(r'^media/js/mainmap.js$', map_data), + url(r'^media/admin/(?P<path>.*)$', static.serve, {'document_root': settings.MEDIA_ROOT + '/admin'}), + url(r'^media/(?P<path>.*)$', 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<slug>[-\w]+)/?$', 'pages.views.page'), + url(r'^(?P<slug>[-\w]+)/?$', page), ] urlpatterns += [ @@ -91,5 +84,5 @@ urlpatterns += [ ), ] urlpatterns += [ - (r'^comments/', include('django_comments.urls')), + url(r'^comments/', include('django_comments.urls')), ] |