diff options
Diffstat (limited to 'core/views/statistics.py')
-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}) |