summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2021-11-06 22:59:10 +0200
committerPhilip Sargent <philip.sargent@gmail.com>2021-11-06 22:59:10 +0200
commit73ffb509f79a6f623ba9c82be17c907cbcdf7afb (patch)
tree241b3f6625b5865347e3bdfa1773a4f168547b99
parent5723f57fc51804e2b31d8b86705a97506bf6cee2 (diff)
downloadtroggle-73ffb509f79a6f623ba9c82be17c907cbcdf7afb.tar.gz
troggle-73ffb509f79a6f623ba9c82be17c907cbcdf7afb.tar.bz2
troggle-73ffb509f79a6f623ba9c82be17c907cbcdf7afb.zip
CaveView status is now documented
-rw-r--r--core/views/caves.py6
-rw-r--r--templates/cave.html32
2 files changed, 30 insertions, 8 deletions
diff --git a/core/views/caves.py b/core/views/caves.py
index 97f06cc..5fb070d 100644
--- a/core/views/caves.py
+++ b/core/views/caves.py
@@ -219,9 +219,9 @@ def rendercave(request, cave, slug, cave_id=''):
# NOTE the template itself loads the 3d file using javascript before it loads anything else.
# Django cannot see what this javascript is doing, so we need to ensure that the 3d file exists first.
- # run this just for the side-effect of generating the 3d file? Nope, crashes.
- # TO DO - restructure this so that the regeneration is callable from here.
- #discard_response = cave3d(request, cave_id=cave_id)
+ # So only do this render if a valid .3d file exists. TO BE DONE
+ # see design docum in troggle/templates/cave.html
+ # see rendercave() in troggle/core/views/caves.py
templatefile = 'cave.html'
if request.user.is_authenticated:
editable = True
diff --git a/templates/cave.html b/templates/cave.html
index d7ceb13..523c2a6 100644
--- a/templates/cave.html
+++ b/templates/cave.html
@@ -3,11 +3,33 @@
{% block extraheaders %}
{% if cave.survex_file %}
-<!--# This is presumably very similar caveview.css but why is it copied here ?
+<!--
+#Wookey says (Nov.2021) that the CaveView integration was done by Martin Green
+#at an expo training weekend.
+# This design assumes that all .3d files are in the same folder, as
+# specified by THREEDCACHEDIR in localsettings.py which implicitly is
+# assuming that all survex files have unique filenames - which is not true
+# there are about 20 duplicates, see report items in DataIssues
+# http://expo.survex.com/pathsreport
+# http://expo.survex.com/dataissues
+
+# This also means that all survex files must be individually run through survex,
+# (which takes as much time as the rest of the import procedure for all data).
+# Olly says it would be more accurate to just produce one 1623.3d and then to
+# separate out the bit for each cave. He's right: we are losing the corrections
+# from adjacent caves and surface surveys doing it this way.
+# The code is RunSurvexIfNeeded() in parsers/survex.py
+
+# SUGGESTION we shuld just ditch and put ever .3d file in the same folder as
+# the .svx file, using the {{svx3d}} template variable set in rendercave() in
+# core/views/caves.py but with a full path.
+
+
+# This css code below is very similar caveview.css but why is it copied here ?
# Because it is NOT exactly the same as the distrubuted CaveView code.
-#e.g. the body {} bit in Caveview/css/caveview.css is missing here:
-# Needs to be separated out into JSLIB local. (PMS 27/4/2021)
--->
+# e.g. the body {} bit in Caveview/css/caveview.css is missing here:
+
+#-->
<style>
div.cv-panel {
@@ -426,7 +448,7 @@ div#scene {
CV.UI.init( 'scene', {
home: '/javascript/CaveView/',
surveyDirectory: '/expowebcache/3d/',
- terrainDirectory: '/loser/surface/terrain/' // cannot work, apache not handling this
+ terrainDirectory: '/loser/surface/terrain/' // cannot work, apache not handling this url
} );
// load a single survey to display