summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/base_urls.py37
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')),
]