diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2022-10-09 00:17:53 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2022-10-09 00:17:53 +0300 |
commit | e6ca20b1eda8c6d074dd698c0e1c64b24e86a4c1 (patch) | |
tree | b581d79018883159b1800aa93add869332281006 /core/views | |
parent | b470ab66e2db18bbad4c9190635a2d8e0ae8eb81 (diff) | |
download | troggle-e6ca20b1eda8c6d074dd698c0e1c64b24e86a4c1.tar.gz troggle-e6ca20b1eda8c6d074dd698c0e1c64b24e86a4c1.tar.bz2 troggle-e6ca20b1eda8c6d074dd698c0e1c64b24e86a4c1.zip |
new report to make aliases visible
Diffstat (limited to 'core/views')
-rw-r--r-- | core/views/statistics.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/views/statistics.py b/core/views/statistics.py index 15858d3..2e6684f 100644 --- a/core/views/statistics.py +++ b/core/views/statistics.py @@ -14,6 +14,7 @@ from django.utils import timezone from troggle.core.models.troggle import Expedition, Person, PersonExpedition, DataIssue from troggle.core.models.caves import Cave, LogbookEntry, Entrance from troggle.core.models.survex import SurvexBlock, SurvexStation +from troggle.parsers.people import GetPersonExpeditionNameLookup import troggle.settings as settings @@ -170,3 +171,16 @@ def eastings(request): stations = SurvexStation.objects.all() return render(request,'eastings.html', {'ents': ents, 'stations': stations}) + +def aliases(request, year): + '''Page which displays a list of all the person aliases in a specific year + ''' + if not year: + year = 1998 + expo = Expedition.objects.filter(year=year)[0] # returns a set, even though we know there is only one + personexpeditions = PersonExpedition.objects.filter(expedition=expo) + persons = Person.objects.all() + + aliasdict = GetPersonExpeditionNameLookup(expo) + + return render(request,'aliases.html', {'year': year, 'aliasdict': aliasdict,'personexpeditions': personexpeditions, 'persons': persons}) |