diff --git a/core/views/statistics.py b/core/views/statistics.py index 56517d7..c22d1a4 100644 --- a/core/views/statistics.py +++ b/core/views/statistics.py @@ -15,7 +15,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 +from troggle.parsers.people import GetPersonExpeditionNameLookup, foreign_friends import troggle.settings as settings @@ -176,12 +176,14 @@ def eastings(request): 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 = list(Person.objects.all().order_by('last_name')) + aliases = GetPersonExpeditionNameLookup(expo) aliasdict={} @@ -190,4 +192,5 @@ def aliases(request, year): invert ={} - return render(request,'aliases.html', {'year': year, 'aliasdict': aliasdict, 'invert': invert,'personexpeditions': personexpeditions, 'persons': persons}) + return render(request,'aliases.html', {'year': year, 'aliasdict': aliasdict, + 'foreign_friends': foreign_friends, 'invert': invert,'personexpeditions': personexpeditions, 'persons': persons}) diff --git a/parsers/people.py b/parsers/people.py index 0f3a66e..83d656c 100644 --- a/parsers/people.py +++ b/parsers/people.py @@ -133,17 +133,20 @@ def who_is_this(year,possibleid): return personexpedition.person else: return None - -def known_foreigner(id): - '''If this someone from ARGE or a known Austrian? Name has to be exact, no soft matching - ''' - friends = ["P. Jeutter", "K. Jäger", "S. Steinberger", "R. Seebacher", + +global foreign_friends +foreign_friends = ["P. Jeutter", "K. Jäger", "S. Steinberger", "R. Seebacher", "Dominik Jauch", "Fritz Mammel", "Marcus Scheuerman", "Uli Schütz", "Wieland Scheuerle", "Kai Schwekend", "Regina Kaiser", "Thilo Müller","Wieland Scheuerle", - "Florian Gruner", "Helmut Stopka-Ebeler", "Aiko", "Mark Morgan"] + "Florian Gruner", "Helmut Stopka-Ebeler", "Aiko", "Mark Morgan", "Arndt Karger"] + +def known_foreigner(id): + '''If this someone from ARGE or a known Austrian? Name has to be exact, no soft matching + ''' + global foreign_friends - if id in friends: + if id in foreign_friends: return True else: return False diff --git a/templates/aliases.html b/templates/aliases.html index 9ad50e0..f8f2bf5 100644 --- a/templates/aliases.html +++ b/templates/aliases.html @@ -60,6 +60,16 @@ is used in the table above to construct possible unambiguous identifiers. {% endfor %} +

And these are people known to us, who appear as survex *team members or in logbook participant lists, but are not expo members +and so are not managed or reported: +{% for p in foreign_friends %} + + {{p}}, + +{% endfor %} + + +

Don't blame me [programmer] for this, it's just what you all have collectively done over the decades by using this absurd variety of short-form name formats when you have entered the cave data.

The code that does this is in troggle/parsers/people.py.