diff --git a/core/views/statistics.py b/core/views/statistics.py index f56b821..a796d04 100644 --- a/core/views/statistics.py +++ b/core/views/statistics.py @@ -6,7 +6,7 @@ from django.shortcuts import render import troggle.settings as settings from troggle.core.models.caves import Cave, Entrance from troggle.core.models.logbooks import LogbookEntry -from troggle.core.models.survex import SurvexStation +from troggle.core.models.survex import SurvexStation, SurvexPersonRole from troggle.core.models.troggle import DataIssue, Expedition, Person, PersonExpedition from troggle.parsers.people import GetPersonExpeditionNameLookup, foreign_friends @@ -49,6 +49,11 @@ def svxfilewild(request, year=None): if sb.name != "rootblock": svxwild.append(sb) print(f" WILD {sb.survexfile} {sb.date}") + people = SurvexPersonRole.objects.filter(survexblock=sb) + team = [] + for p in people: + team.append(p.personname) + sb.team = team # else: # print(f" TAME {sb.survexfile}") diff --git a/templates/survexfilewild.html b/templates/survexfilewild.html index 36cfbc3..ed90f7f 100644 --- a/templates/survexfilewild.html +++ b/templates/survexfilewild.html @@ -11,14 +11,15 @@ i.e. they have no *REF line which refers to the wallet holding the raw data for
WORK IN PROGRESS
Survex Blocks | date | survex file | surveyed length | ||
---|---|---|---|---|---|
survex block with no *ref | date | parent block | within survex file | surveyed length | team |
{{ sb }} | {{sb.date }} | +{{sb.parent }} | {{sb.survexfile.path}} | {{sb.legslength|floatformat:"1g" }}m | -{{sb.team|truncatechars:50 }} | {% endfor %}