fixed url glitch, added parent url

This commit is contained in:
2023-03-21 14:29:15 +00:00
parent 7caf1690c6
commit 435f3cf00b
2 changed files with 13 additions and 8 deletions

View File

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