2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-02-08 11:49:50 +00:00

expopages now troggle/core/views_expo

This commit is contained in:
Philip Sargent
2021-03-30 21:48:36 +01:00
parent b75baffdcf
commit b3b2356a7e
12 changed files with 17 additions and 33 deletions

14
urls.py
View File

@@ -10,7 +10,7 @@ from troggle.core import views_other, views_caves, views_logbooks, views_statist
from troggle.core.views_other import troggle404
from troggle.core.views_caves import ent, prospecting_image
from troggle.core.views_statistics import pathsreport, stats
from expopages import views as flatviews
from troggle.core.views_expo import expofiles_redirect, expofilessingle, flatpage, editflatpage
"""This sets the actualurlpatterns[] and urlpatterns[] lists which django uses
to resolve urls - in both directions as these are declarative.
@@ -33,11 +33,11 @@ The API urls return TSV or JSON and are new in July 2020.
if settings.EXPOFILESREMOTE:
expofilesurls = [
url(r'^/*(?P<path>.*)$', flatviews.expofiles_redirect, name="expofiles_redirect"), # to expo.survex.com/expofiles
url(r'^/*(?P<path>.*)$', expofiles_redirect, name="expofiles_redirect"), # to expo.survex.com/expofiles
]
else:
expofilesurls = [
url(r'^/*(?P<filepath>.*)$',flatviews.expofilessingle, name="single"), # local copy of EXPOFILES
url(r'^/*(?P<filepath>.*)$', expofilessingle, name="single"), # local copy of EXPOFILES
]
@@ -142,13 +142,13 @@ actualurlpatterns = [
# {'document_root': settings.PHOTOS_ROOT, 'show_indexes':True}),
# url(r'^site_media/(?P<filepath>.*)$', view_surveys.expofilessingle, name="single"), # MEDIA_ROOT: CSS and JS
url(r'^(site_media/.*)$', flatviews.flatpage, name="flatpage"), # MEDIA_ROOT: CSS and JS
url(r'^(site_media/.*)$', flatpage, name="flatpage"), # MEDIA_ROOT: CSS and JS
# url(r'^static/(?P<filepath>.*)$', view_surveys.expofilessingle, name="single"), # MEDIA_ROOT: CSS and JS
url(r'^(static/.*)$', flatviews.flatpage, name="flatpage"), # STATIC: CSS and JS
url(r'^(static/.*)$', flatpage, name="flatpage"), # STATIC: CSS and JS
url(r'^(.*)_edit$', flatviews.editflatpage, name="editflatpage"),
url(r'^(.*)$', flatviews.flatpage, name="flatpage"), # CATCHALL assumed relative to EXPOWEB, some expofiles getting here..
url(r'^(.*)_edit$', editflatpage, name="editflatpage"),
url(r'^(.*)$', flatpage, name="flatpage"), # CATCHALL assumed relative to EXPOWEB, some expofiles getting here..
]
#Allow DIR_ROOT prefix to all urls