summaryrefslogtreecommitdiffstats
path: root/core/views/logbooks.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2024-04-10 23:25:13 +0100
committerPhilip Sargent <philip.sargent@gmail.com>2024-04-10 23:25:13 +0100
commitdfdf21459a08664956cd7c05d8d0f69ae4ff872b (patch)
tree8e6690cbec7b0f7f97060f45a19f8b7211b769ac /core/views/logbooks.py
parentb73ac24a3b4644c53ae95f3fb7c634c0eeb8a252 (diff)
downloadtroggle-dfdf21459a08664956cd7c05d8d0f69ae4ff872b.tar.gz
troggle-dfdf21459a08664956cd7c05d8d0f69ae4ff872b.tar.bz2
troggle-dfdf21459a08664956cd7c05d8d0f69ae4ff872b.zip
fix current year in top menu
Diffstat (limited to 'core/views/logbooks.py')
-rw-r--r--core/views/logbooks.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/views/logbooks.py b/core/views/logbooks.py
index da0468e..838595a 100644
--- a/core/views/logbooks.py
+++ b/core/views/logbooks.py
@@ -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."