forked from expo/troggle
new report to make aliases visible
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user