mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 09:26:47 +00:00
fix bug and make table better
This commit is contained in:
@@ -400,6 +400,7 @@ def svx(request, survex_file):
|
||||
form.data["code"] = rcode
|
||||
|
||||
# GET, also fall-through after POST-specific handling
|
||||
|
||||
if svxfile := get_survexfile(survex_file):
|
||||
print(f"svx(): a real SurvexFile object {svxfile=} {svxfile.id=}")
|
||||
|
||||
@@ -418,7 +419,7 @@ def svx(request, survex_file):
|
||||
svxincludes = re.findall(r"(?i)\*include\s+(\S+)", form.data["code"] or "")
|
||||
|
||||
# collect all the survex blocks which actually have a valid date
|
||||
if svxfile:
|
||||
if svxfile:
|
||||
#dirparent = Path(svxfile.primary.path).parent
|
||||
has_3d = (Path(SVXPATH) / Path(survex_file + ".3d")).is_file()
|
||||
try:
|
||||
@@ -749,7 +750,7 @@ def survexcavesingle(request, cave_shortname):
|
||||
"""parsing all the survex files of a single cave and showing that it's consistent and can find all
|
||||
the files and people.
|
||||
|
||||
But might also be a link to a single survex file with no ".svx" suffix
|
||||
But might also be a link to a single survex file with no ".svx" suffix, which may not be a cave.
|
||||
"""
|
||||
if cave_shortname.startswith("caves-16"):
|
||||
return svx(request, cave_shortname)
|
||||
@@ -769,7 +770,9 @@ def survexcavesingle(request, cave_shortname):
|
||||
# print(f"many {cave=} => {cave.sds=}")
|
||||
return render(request, "svxcaves.html", {"settings": settings, "caves": caves, "year": current_expo()})
|
||||
else:
|
||||
return render(request, "errors/svxcaves404.html", {"settings": settings, "cave": cave_shortname, "year": current_expo()})
|
||||
# survex file not a cave, e.g. surface/1623/allsurface.svx
|
||||
return svx(request, cave_shortname)
|
||||
# return render(request, "errors/svxcaves404.html", {"settings": settings, "cave": cave_shortname, "year": current_expo()})
|
||||
|
||||
def check_cave_registered(areacode, survex_cave):
|
||||
"""Checks whether a cave has been properly registered when it is found in the Loser repo
|
||||
|
||||
Reference in New Issue
Block a user