2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 08:41:51 +00:00

added caves URL table at end of report

This commit is contained in:
Philip Sargent 2023-09-30 22:28:43 +03:00
parent c884156889
commit c80db1a55f
2 changed files with 12 additions and 2 deletions

View File

@ -647,13 +647,13 @@ def survexcaveslist(request):
def survexdir(request):
"""report on all the primary survex files, per cave and per directory
"""
caves = Cave.objects.all()
survexfiles = SurvexFile.objects.all().order_by("cave")
for f in survexfiles:
f.pathbad = True
if Path(settings.SURVEX_DATA, f"{f.path}.svx").is_file():
f.pathbad = False
return render(request, "survexdir.html", {"survexfiles": survexfiles})
return render(request, "survexdir.html", {"survexfiles": survexfiles, "caves": caves})
def get_primaries(cave):
sds = []

View File

@ -19,4 +19,14 @@
</tr>
{% endfor %}
</table>
<table>
<tr><th>Cave</th><th>Cave url</th></tr>
{% for c in caves %}
<tr>
<td>{{c}}</td>
<td>{{c.url}}</td>
</tr>
{% endfor %}
</table>
{% endblock %}