diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2025-06-28 18:27:25 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2025-06-28 18:27:25 +0300 |
commit | fc427993e75fe75a2f8389000f4b658a418955c1 (patch) | |
tree | 97a7d9529339e7265ab709d775542b0220fd65c7 /core | |
parent | c89e8cea90aa0493cbdecce5c4f9a8bd5dce2c17 (diff) | |
download | troggle-fc427993e75fe75a2f8389000f4b658a418955c1.tar.gz troggle-fc427993e75fe75a2f8389000f4b658a418955c1.tar.bz2 troggle-fc427993e75fe75a2f8389000f4b658a418955c1.zip |
separating out ARGE surveys from badly recorded Jenny&Olly surveys
Diffstat (limited to 'core')
-rw-r--r-- | core/models/survex.py | 1 | ||||
-rw-r--r-- | core/views/statistics.py | 12 |
2 files changed, 11 insertions, 2 deletions
diff --git a/core/models/survex.py b/core/models/survex.py index 7160893..1d5e501 100644 --- a/core/models/survex.py +++ b/core/models/survex.py @@ -214,6 +214,7 @@ class SurvexBlock(models.Model): legsall = models.IntegerField(null=True) # summary data for this block legslength = models.FloatField(null=True) + foreigners = models.BooleanField(default=False) class Meta: ordering = ("id",) diff --git a/core/views/statistics.py b/core/views/statistics.py index 774336e..f1b73cc 100644 --- a/core/views/statistics.py +++ b/core/views/statistics.py @@ -44,13 +44,19 @@ def svxfilewild(request, year=None): legsbyexpo.reverse() svxwild = [] + svxforeign = [] wildlength = 0.0 + foreignlength = 0.0 for expedition in expos: survexblocks = expedition.survexblock_set.all() for sb in survexblocks: # print(f"{sb=}") if sb.scanswallet == None: - if sb.name != "rootblock": + if sb.foreigners: + svxforeign.append(sb) + print(f" FOREIGN {sb.survexfile} {sb.date}") + foreignlength += sb.legslength + elif sb.name != "rootblock": svxwild.append(sb) print(f" WILD {sb.survexfile} {sb.date}") wildlength += sb.legslength @@ -74,8 +80,10 @@ def svxfilewild(request, year=None): "nsurvexlegs": addupsurvexlegs, "walletslength": walletslength, "wildlength": wildlength, + "foreignlength": foreignlength, "year":year, - "svxwild": svxwild} + "svxwild": svxwild, + "svxforeign": svxforeign} ) def therionissues(request): |