summaryrefslogtreecommitdiffstats
path: root/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'urls.py')
-rw-r--r--urls.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/urls.py b/urls.py
index 2297535..79651c3 100644
--- a/urls.py
+++ b/urls.py
@@ -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 troggle.core.views_expo import expofiles_redirect, expofilessingle, flatpage, editflatpage
+from troggle.core.views_expo import expofiles_redirect, expofilessingle, expopage, editexpopage
"""This sets the actualurlpatterns[] and urlpatterns[] lists which django uses
to resolve urls - in both directions as these are declarative.
@@ -33,16 +33,16 @@ The API urls return TSV or JSON and are new in July 2020.
if settings.EXPOFILESREMOTE:
expofilesurls = [
- url(r'^/*(?P<path>.*)$', 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>.*)$', expofilessingle, name="single"), # local copy of EXPOFILES
+ url(r'^(?P<filepath>.*)$', expofilessingle, name="single"), # local copy of EXPOFILES
]
-actualurlpatterns = [
- url(r'^expofiles', include(expofilesurls)),
+trogglepatterns = [
+ url(r'^expofiles/', include(expofilesurls)),
url(r'^troggle$', views_other.frontpage, name="frontpage"), # control panel. Shows recent actions.
url(r'^caves$', views_caves.caveindex, name="caveindex"),
@@ -142,18 +142,19 @@ 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/.*)$', flatpage, name="flatpage"), # MEDIA_ROOT: CSS and JS
+ url(r'^(site_media/.*)$', expopage, name="expopage"), # MEDIA_ROOT: CSS and JS
# url(r'^static/(?P<filepath>.*)$', view_surveys.expofilessingle, name="single"), # MEDIA_ROOT: CSS and JS
- url(r'^(static/.*)$', flatpage, name="flatpage"), # STATIC: CSS and JS
+ url(r'^(static/.*)$', expopage, name="expopage"), # STATIC: CSS and JS
- url(r'^(.*)_edit$', editflatpage, name="editflatpage"),
- url(r'^(.*)$', flatpage, name="flatpage"), # CATCHALL assumed relative to EXPOWEB, some expofiles getting here..
+ url(r'^(.*)_edit$', editexpopage, name="editexpopage"),
+ url(r'^(.*)$', expopage, name="expopage"), # CATCHALL assumed relative to EXPOWEB
]
-#Allow DIR_ROOT prefix to all urls
+# do not allow DIR_ROOT prefix to all urls
urlpatterns = [
- url('^%s' % settings.DIR_ROOT, include(actualurlpatterns))
+ # url('^%s' % settings.DIR_ROOT, include(trogglepatterns))
+ url('', include(trogglepatterns))
]
# When apache is running these prempt Django so Django never sees them.