From 8c8b6966a7d1e7ee1be5b2e4d8dfefcc3bf32410 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Mon, 10 Oct 2022 00:28:57 +0300 Subject: sort output, accept more comma use --- core/views/statistics.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'core/views/statistics.py') diff --git a/core/views/statistics.py b/core/views/statistics.py index 14205b7..56517d7 100644 --- a/core/views/statistics.py +++ b/core/views/statistics.py @@ -1,6 +1,7 @@ import datetime import os.path import re +import operator from collections import OrderedDict import django.db.models @@ -179,12 +180,10 @@ def aliases(request, 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() - + persons = list(Person.objects.all().order_by('last_name')) + aliases = GetPersonExpeditionNameLookup(expo) - aliasdict = {key: val for key, val in sorted(aliases.items(), key = lambda ele: ele[0])} - aliasdict={} for i in sorted(aliases): aliasdict[i]=aliases[i] -- cgit v1.2.3