1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
from django.conf.urls import *
from django.contrib import admin
from django.views.generic import TemplateView
from django.conf import settings
from jrnl.models import BlogSitemap
from jrnl.views import HomepageList
from locations.models import WritingbyCountrySitemap
from photos.models import PhotoGallerySitemap
from src.models import SrcSitemap
from figments.models import FigmentSitemap
from projects.models.base import ProjectSitemap
admin.autodiscover()
sitemaps = {
'blog': BlogSitemap,
'writingbyloc': WritingbyCountrySitemap,
'photos': PhotoGallerySitemap,
'projects': ProjectSitemap,
'src': SrcSitemap
}
urlpatterns = patterns('',
(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')
),
url(
regex=r'^jrnl/',
view=include('jrnl.urls', namespace='jrnl')
),
(r'^projects/', include('projects.urls')),
(r'^locations/', include('locations.urls')),
url(
regex=r'^expenses/',
view=include('expenses.urls', namespace='expenses')
),
(r'^photos/', include('photos.urls')),
url(
regex=r'^books/',
view=include('books.urls', namespace='books')
),
url(
regex=r'^field-notes/',
view=include('notes.urls', namespace='notes')
),
url(
regex=r'^photo/',
view=include('photos.detail_urls', namespace='photos')
),
url(
regex=r'^birds/',
view=include('birds.urls', namespace='birds')
),
(r'^travel-guide/', include('guide.urls')),
(r'^src/', include('src.urls', namespace='src')),
url(
regex=r'^figments/',
view=include('figments.urls', namespace='figments')
),
(r'^map/', include('locations.urls')),
url(
regex=r'^$',
view=HomepageList.as_view(),
name="homepage"
),
#pages
(r'^(?P<slug>[-\w]+)/?$', 'pages.views.page'),
)
urlpatterns += patterns('',
url(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.STATIC_ROOT, }
),
)
urlpatterns += patterns('',
(r'^comments/', include('django_comments.urls')),
#url(r'^comments/', include('django_comments_xtd.urls'))
#url(r'^comments/', include('fluent_comments.urls')),
)
|