summaryrefslogtreecommitdiff
path: root/config/base_urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'config/base_urls.py')
-rw-r--r--config/base_urls.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/config/base_urls.py b/config/base_urls.py
index 201a621..b0959ff 100644
--- a/config/base_urls.py
+++ b/config/base_urls.py
@@ -1,7 +1,6 @@
-from django.conf.urls.defaults import *
+from django.conf.urls import *
from django.contrib import admin
-from django.views.generic import list_detail
-from django.views.generic.simple import redirect_to,direct_to_template
+from django.views.generic import TemplateView
from django.contrib.sitemaps import FlatPageSitemap
from django.conf import settings
@@ -25,27 +24,26 @@ feeds = {
}
urlpatterns = patterns('',
+ (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/$', direct_to_template, {'template': 'static/oldcontent.html'}),
- (r'^2003/aug/07/take-me-your-leader/$', direct_to_template, {'template': 'static/oldcontent.html'}),
- (r'^2004/jan/07/david-foster-wallace-infinity/$', direct_to_template, {'template': 'static/oldcontent.html'}),
+ (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/doc/', include('django.contrib.admindocs.urls')),
- #(r'^admin/filebrowser/', include('filebrowser.urls')),
(r'^admin/build/.*', 'builder.views.do_build'),
(r'^admin/', include(admin.site.urls),),
(r'^grappelli/', include('grappelli.urls')),
#(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
- (r'^robots.txt$', direct_to_template, {'template': 'archives/robots.html'}),
- (r'^googleb11655cd59dacf3c.html$', direct_to_template, {'template': 'static/gverify.html'}),
- #(r'^contact/', direct_to_template, {'template': 'details/contact.html'}),
+ (r'^robots.txt$', TemplateView.as_view(template_name='archives/robots.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}),
(r'^writing/', include('blog.urls')),
(r'^projects/', include('projects.urls')),