diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-03-31 23:19:48 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-03-31 23:19:48 +0100 |
commit | 269020391240f15d5d5997f88b51f401abf37cb1 (patch) | |
tree | 75cf2d8802bf0d0abe583e25f6b012d77d484f8c /urls.py | |
parent | 9d8a44696bfcd045d64acb7d6eb0038a721cd8f3 (diff) | |
download | troggle-269020391240f15d5d5997f88b51f401abf37cb1.tar.gz troggle-269020391240f15d5d5997f88b51f401abf37cb1.tar.bz2 troggle-269020391240f15d5d5997f88b51f401abf37cb1.zip |
new method for /site-media/, /static/, /photos/
Diffstat (limited to 'urls.py')
-rw-r--r-- | urls.py | 18 |
1 files changed, 4 insertions, 14 deletions
@@ -10,7 +10,7 @@ from troggle.core.views import surveys, logbooks, other, caves, statistics, surv from troggle.core.views.other import troggle404, frontpage from troggle.core.views.caves import ent, prospecting_image from troggle.core.views.statistics import pathsreport, stats -from troggle.core.views.expo import expofiles_redirect, expofilessingle, expopage, editexpopage +from troggle.core.views.expo import expofiles_redirect, expofilessingle, expopage, editexpopage, mediapage from troggle.core.views.survex import survexcaveslist, survexcavesingle, svx """This sets the actualurlpatterns[] and urlpatterns[] lists which django uses to resolve urls - in both directions as these are declarative. @@ -40,7 +40,6 @@ else: expofilesurls = [ url(r'^(?P<filepath>.*)$', expofilessingle, name="single"), # local copy of EXPOFILES ] - trogglepatterns = [ url(r'^expofiles/', include(expofilesurls)), @@ -134,19 +133,10 @@ trogglepatterns = [ url(r'^prospecting/(?P<name>[^.]+).png$', prospecting_image, name="prospecting_image"), -# url(r'^javascript/(?P<filepath>.*)$', surveys.expofilessingle, name="single"), # JSLIB_URL - Apache: Alias /javascript /usr/share/javascript + url(r'^photos/(?P<subpath>.*)$', mediapage, {'doc_root': settings.PHOTOS_ROOT}, name="mediapage"), # photo galleries + url(r'^site_media/(?P<subpath>.*)$', mediapage, {'doc_root': settings.MEDIA_ROOT}, name="mediapage"), # MEDIA_ROOT: CSS and JS + url(r'^static/(?P<subpath>.*)$', mediapage, {'doc_root': settings.STATIC_ROOT}, name="mediapage"), # STATIC: CSS and JS -# static views not working, removed as a plugin. Use apache instead to serve these: -# url(r'^photos/(?P<path>.*)$', staticviews.serve, -# {'document_root': settings.PHOTOS_ROOT, 'show_indexes':True}), -# url(r'^gallery/(?P<path>.*)$', staticviews.serve, -# {'document_root': settings.PHOTOS_ROOT, 'show_indexes':True}), - -# url(r'^site_media/(?P<filepath>.*)$', surveys.expofilessingle, name="single"), # MEDIA_ROOT: CSS and JS - url(r'^(site_media/.*)$', expopage, name="expopage"), # MEDIA_ROOT: CSS and JS - -# url(r'^static/(?P<filepath>.*)$', surveys.expofilessingle, name="single"), # MEDIA_ROOT: CSS and JS - url(r'^(static/.*)$', expopage, name="expopage"), # STATIC: CSS and JS url(r'^(.*)_edit$', editexpopage, name="editexpopage"), url(r'^(.*)$', expopage, name="expopage"), # CATCHALL assumed relative to EXPOWEB |