CaveView status is now documented

This commit is contained in:
Philip Sargent 2021-11-06 22:59:10 +02:00
parent 5723f57fc5
commit 73ffb509f7
2 changed files with 30 additions and 8 deletions

View File

@ -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

View File

@ -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