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
|
from django.conf.urls import url, include
from django.contrib import admin
from django.views import static
from django.conf import settings
from django.contrib.sitemaps.views import sitemap
from django.views.generic import TemplateView
from pages.views import page
from pages.views import PageDetailView
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
from projects.models.base import ProjectSitemap
from syndication.views import FacebookFeedView
import builder.views
import utils.views
from locations.views import MapDataList
admin.autodiscover()
sitemaps = {
'blog': BlogSitemap,
'writingbyloc': WritingbyCountrySitemap,
'photos': PhotoGallerySitemap,
'projects': ProjectSitemap,
'src': SrcSitemap
}
urlpatterns = [
url(r'^projects/data/natparks/(?P<path>.*)$', static.serve, {'document_root': settings.PROJ_ROOT + 'site/projects/data/natparks/'}),
url(
r'^media/js/mainmap.js$',
MapDataList.as_view(),
name="mapdatalist"
),
url (r'media/js/leaflet-providers.js',
TemplateView.as_view(template_name='js/leaflet-providers.js')
),
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}),
]
from utils.views import TagAutocomplete
urlpatterns += [
url(
r'^tag-autocomplete/$',
TagAutocomplete.as_view(),
name='tag-autocomplete',
),
url(r'^admin/build/.*', builder.views.do_build),
url(r'^admin/', include(admin.site.urls),),
url(r'^luximages/insert/', utils.views.insert_image),
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')),
url(r'^photos/', include('photos.urls')),
url(r'^books/', include('books.urls')),
url(r'^field-notes/', include('notes.urls')),
url(
r'^birds/',
include('birds.urls', namespace='birds')
),
url(r'^travel-guide/', include('guide.urls')),
url(r'^src/', include('src.urls', namespace='src')),
url(r'^figments/', include('figments.urls', namespace='figments')),
url(r'^resume/', include('resume.urls', namespace='resume')),
url(r'^map/', include('locations.urls', namespace='map')),
url(
r'^$',
HomepageList.as_view(),
name="homepage"
),
# facebook ia feed
url(r'^iafeed.xml$', FacebookFeedView.as_view()),
url(r'^comments/', include('django_comments.urls')),
# pages
url(r'^(?P<slug>[-\w]+)/?$', PageDetailView.as_view()),
url(r'^(?P<path>[-\w]+)/(?P<slug>[-\w]+)?$', PageDetailView.as_view()),
]
urlpatterns += [
url(
r'^static/(?P<path>.*)$',
static.serve,
{'document_root': settings.STATIC_ROOT, }
),
]
if settings.DEBUG:
import debug_toolbar
urlpatterns = [
url(r'^__debug__/', include(debug_toolbar.urls)),
] + urlpatterns
|