summaryrefslogtreecommitdiff
path: root/config/base_urls.py
blob: 0f63a75ed56de2314535c16fd1102166cba81375 (plain)
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
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 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

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$', 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'^autocomplete/', include('autocomplete_light.urls')),
    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')),
    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, }
    ),
]