diff --git a/core/views/survex.py b/core/views/survex.py index 45d63ea..d98c091 100644 --- a/core/views/survex.py +++ b/core/views/survex.py @@ -281,6 +281,11 @@ def svx(request, survex_file): Needs refactoring. Too many piecemeal edits and odd state dependencies. """ warning = False + + print(survex_file) + if survex_file.lower().endswith(".svx"): + survex_file = survex_file[:-4] + print(survex_file) # get the basic data from the file given in the URL dirname = os.path.split(survex_file)[0] # replace with proper pathlib function.. @@ -382,7 +387,7 @@ def svx(request, survex_file): "settings": settings, "warning": warning, "has_3d": has_3d, - "title": survex_file, + "survexfile": svxfile, "svxlength": svxlength, "svxblocks": svxblocks, "svxincludes": svxincludes, diff --git a/templates/svxfile.html b/templates/svxfile.html index 97dcfe2..ae0e20d 100644 --- a/templates/svxfile.html +++ b/templates/svxfile.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}{{ title }}{% endblock %} +{% block title %}{{ survexfile }}{% endblock %} {% block head %} @@ -38,9 +38,9 @@ $(document).ready(function() {% block content %} {% if warning %} -
Click here to view the 3d file produced as output
+Click here to view the 3d file produced as output
{% else %} -No 3d file generated. There was an ERROR
Read the full .log file
- the .err file and fix this .svx file
No 3d file generated. There was an ERROR
Read the full .log file
+ the .err file and fix this .svx file