mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-18 17:07:04 +00:00
fix current year in top menu
This commit is contained in:
@@ -159,7 +159,8 @@ def person(request, slug=""):
|
||||
"""Now very much simpler with an unambiguous slug
|
||||
"""
|
||||
this_person = Person.objects.get(slug=slug)
|
||||
return render(request, "person.html", {"person": this_person})
|
||||
current_year = current_expo()
|
||||
return render(request, "person.html", {"person": this_person, "year": current_year})
|
||||
|
||||
def get_person_chronology(personexpedition):
|
||||
"""
|
||||
@@ -201,9 +202,10 @@ def personexpedition(request, slug="", year=""):
|
||||
this_expedition = Expedition.objects.get(year=year)
|
||||
personexpedition = person.personexpedition_set.get(expedition=this_expedition)
|
||||
personchronology = get_person_chronology(personexpedition)
|
||||
current_year = current_expo()
|
||||
|
||||
return render(
|
||||
request, "personexpedition.html", {"personexpedition": personexpedition, "personchronology": personchronology}
|
||||
request, "personexpedition.html", {"personexpedition": personexpedition, "personchronology": personchronology, "year": current_year}
|
||||
)
|
||||
except:
|
||||
msg = f" Person '{slug=}' or year '{year=}' not found in database. Please report this to a nerd."
|
||||
|
||||
Reference in New Issue
Block a user