summaryrefslogtreecommitdiffstats
path: root/urls.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2021-03-26 13:51:00 +0000
committerPhilip Sargent <philip.sargent@klebos.com>2021-03-26 13:51:00 +0000
commitf5e799d632dc022f6c3fd53745ea2b724601ab15 (patch)
tree3119c1603f66a00814885c0cc3d1de4f82dfc321 /urls.py
parent2e068d3fbb8ded157f532f70176537b6a7967b1c (diff)
downloadtroggle-f5e799d632dc022f6c3fd53745ea2b724601ab15.tar.gz
troggle-f5e799d632dc022f6c3fd53745ea2b724601ab15.tar.bz2
troggle-f5e799d632dc022f6c3fd53745ea2b724601ab15.zip
new remote expofiles option
Diffstat (limited to 'urls.py')
-rw-r--r--urls.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/urls.py b/urls.py
index ba5a67e..339d38e 100644
--- a/urls.py
+++ b/urls.py
@@ -31,12 +31,28 @@ The API urls return TSV or JSON and are new in July 2020.
# not yet restored all the functions. Some may have never been fully implemented in
# the first place and what they were intended to provide is obscure.
+if settings.EXPOFILESREMOTE:
+ expofilesurls = [
+ url(r'^(?P<path>.*)$', flatviews.expofiles_redirect, name="expofiles_redirect"), # to expo.survex.com/expofiles
+ ]
+else:
+ expofilesurls = [
+ url(r'^(?P<filepath>.*)$',view_surveys.expofilessingle, name="single"), # local copy of EXPOFILES
+ ]
+
+
actualurlpatterns = [
+ url(r'^expofiles/', include(expofilesurls)),
+
url(r'^troggle$', views_other.frontpage, name="frontpage"),
url(r'^caves$', views_caves.caveindex, name="caveindex"),
url(r'^indxal.htm$', views_caves.caveindex, name="caveindex"), # ~420 hrefs to this url in expoweb files
url(r'^people/?$', views_logbooks.personindex, name="personindex"),
+ url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # needs docutils Python module (http://docutils.sf.net/).
+ url(r'^admin/', admin.site.urls),
+ url(r'^accounts/', include('registration.backends.default.urls')), #LOGIN_URL = '/accounts/login/' # default
+
url(r'^newqmnumber/?$', views_other.ajax_QM_number, ),
# url(r'^lbo_suggestions/?$', logbook_entry_suggestions), #broken, removed.
# url(r'^person/(?P<person_id>\d*)/?$', views_logbooks.person),
@@ -90,10 +106,6 @@ actualurlpatterns = [
url(r'^cave/(?P<cave_id>[^/]+)/qm\.csv/?$', views_other.downloadQMs, name="downloadqms"),
url(r'^downloadqms$', views_other.downloadQMs),
- url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # needs docutils Python module (http://docutils.sf.net/).
- url(r'^admin/', admin.site.urls),
- url(r'^accounts/', include('registration.backends.default.urls')), #LOGIN_URL = '/accounts/login/' # default
-# url(r'^profiles/', include('profiles.urls')), # not used ? Delete this entire app then.
# url(r'^map/', .........), # Intercepted by Apache. Yields OpenStreetMap. Redirects to expoweb/map
@@ -121,10 +133,7 @@ actualurlpatterns = [
url(r'^prospecting/(?P<name>[^.]+).png$', prospecting_image, name="prospecting_image"),
- # use this next alternative if no local copy of expofiles.
- url(r'^expofiles/(?P<path>.*)$', flatviews.expofiles_redirect, name="expofiles_redirect"), # to expo.survex.com/expofiles
- url(r'^expofiles/(?P<filepath>.*)$',view_surveys.expofilessingle, name="single"), # local copy of EXPOFILES
-
+
# url(r'^javascript/(?P<filepath>.*)$', view_surveys.cssfilessingle, name="single"), # JSLIB_URL - Apache: Alias /javascript /usr/share/javascript
# static views not working, removed as a plugin. Use apache instead to serve these: