mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
added caves URL table at end of report
This commit is contained in:
parent
c884156889
commit
c80db1a55f
@ -647,13 +647,13 @@ def survexcaveslist(request):
|
|||||||
def survexdir(request):
|
def survexdir(request):
|
||||||
"""report on all the primary survex files, per cave and per directory
|
"""report on all the primary survex files, per cave and per directory
|
||||||
"""
|
"""
|
||||||
|
caves = Cave.objects.all()
|
||||||
survexfiles = SurvexFile.objects.all().order_by("cave")
|
survexfiles = SurvexFile.objects.all().order_by("cave")
|
||||||
for f in survexfiles:
|
for f in survexfiles:
|
||||||
f.pathbad = True
|
f.pathbad = True
|
||||||
if Path(settings.SURVEX_DATA, f"{f.path}.svx").is_file():
|
if Path(settings.SURVEX_DATA, f"{f.path}.svx").is_file():
|
||||||
f.pathbad = False
|
f.pathbad = False
|
||||||
return render(request, "survexdir.html", {"survexfiles": survexfiles})
|
return render(request, "survexdir.html", {"survexfiles": survexfiles, "caves": caves})
|
||||||
|
|
||||||
def get_primaries(cave):
|
def get_primaries(cave):
|
||||||
sds = []
|
sds = []
|
||||||
|
@ -19,4 +19,14 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</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 %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user