diff options
author | luxagraf <sng@luxagraf.net> | 2015-12-02 13:03:21 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2015-12-02 13:03:21 -0500 |
commit | 741cea88d882d8ac185121141ef49815835ad8a7 (patch) | |
tree | e465898ca5ba46cc61a191f93f9f71a1fdd7a65d /config | |
parent | 988f1149eedf8de5c6b083370c736a82b53b48ac (diff) |
updated url schemes to quiet some django 1.10 warnings
Diffstat (limited to 'config')
-rw-r--r-- | config/base_urls.py | 99 |
1 files changed, 42 insertions, 57 deletions
diff --git a/config/base_urls.py b/config/base_urls.py index 4cb56ab..d67afe2 100644 --- a/config/base_urls.py +++ b/config/base_urls.py @@ -1,6 +1,7 @@ from django.conf.urls import * from django.contrib import admin from django.views.generic import TemplateView +from django.views import static from django.conf import settings from jrnl.models import BlogSitemap @@ -10,11 +11,11 @@ from photos.models import PhotoGallerySitemap from src.models import SrcSitemap from figments.models import FigmentSitemap from projects.models.base import ProjectSitemap +import builder.views admin.autodiscover() - sitemaps = { 'blog': BlogSitemap, 'writingbyloc': WritingbyCountrySitemap, @@ -23,88 +24,72 @@ sitemaps = { 'src': SrcSitemap } -urlpatterns = patterns('', +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}), -) - -# old page redirects -urlpatterns += patterns('', - (r'^2003/nov/02/take-me-your-leader-ii/$', TemplateView.as_view(template_name='static/oldcontent.html')), - (r'^2003/aug/07/take-me-your-leader/$', TemplateView.as_view(template_name='static/oldcontent.html')), - (r'^2004/jan/07/david-foster-wallace-infinity/$', TemplateView.as_view(template_name='static/oldcontent.html')), -) +] -urlpatterns += patterns('', - (r'^admin/build/.*', 'builder.views.do_build'), - (r'^admin/', include(admin.site.urls),), - #(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}), - (r'^robots.txt$', TemplateView.as_view(template_name='archives/robots.html')), - (r'^arctest$', TemplateView.as_view(template_name='arctest.html')), - (r'^googleb11655cd59dacf3c.html$', TemplateView.as_view(template_name='static/gverify.html')), - #(r'^contact/', TemplateView.as_view(template_name='details/contact.html')), - (r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}), - url( - regex=r'^links/', - view=include('links.urls', namespace='links') - ), +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'^links/', include('links.urls')), + url(r'^jrnl/', include('jrnl.urls')), + url(r'^projects/', include('projects.urls')), url( - regex=r'^jrnl/', - view=include('jrnl.urls', namespace='jrnl') + r'^locations/', + include('locations.urls') ), - (r'^projects/', include('projects.urls')), - (r'^locations/', include('locations.urls')), url( - regex=r'^expenses/', - view=include('expenses.urls', namespace='expenses') + r'^expenses/', + include('expenses.urls', namespace='expenses') ), (r'^photos/', include('photos.urls')), url( - regex=r'^books/', - view=include('books.urls', namespace='books') + r'^books/', + include('books.urls', namespace='books') ), url( - regex=r'^field-notes/', - view=include('notes.urls', namespace='notes') + r'^field-notes/', + include('notes.urls', namespace='notes') ), url( - regex=r'^photo/', - view=include('photos.detail_urls', namespace='photos') + r'^photo/', + include('photos.detail_urls', namespace='photos') ), url( - regex=r'^birds/', - view=include('birds.urls', namespace='birds') + r'^birds/', + include('birds.urls', namespace='birds') ), - (r'^travel-guide/', include('guide.urls')), - (r'^src/', include('src.urls', namespace='src')), + url(r'^travel-guide/', include('guide.urls')), + url(r'^src/', include('src.urls', namespace='src')), url( - regex=r'^figments/', - view=include('figments.urls', namespace='figments') + r'^figments/', + include('figments.urls', namespace='figments') ), url( - regex=r'^resume/', - view=include('resume.urls', namespace='resume') + r'^resume/', + include('resume.urls', namespace='resume') ), - (r'^map/', include('locations.urls')), + url(r'^map', include('locations.urls')), url( - regex=r'^$', - view=HomepageList.as_view(), + r'^$', + HomepageList.as_view(), name="homepage" ), - #pages - (r'^(?P<slug>[-\w]+)/?$', 'pages.views.page'), - -) + # pages + url(r'^(?P<slug>[-\w]+)/?$', 'pages.views.page'), +] -urlpatterns += patterns('', - url(r'^static/(?P<path>.*)$', 'django.views.static.serve', +urlpatterns += [ + url( + r'^static/(?P<path>.*)$', + static.serve, {'document_root': settings.STATIC_ROOT, } ), -) -urlpatterns += patterns('', +] +urlpatterns += [ (r'^comments/', include('django_comments.urls')), - #url(r'^comments/', include('django_comments_xtd.urls')) - #url(r'^comments/', include('fluent_comments.urls')), -) +] |