2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-04-02 10:40:59 +01:00

fix year menu, fix name display, fix no of entries

This commit is contained in:
2024-07-24 21:55:46 +02:00
parent 245486666c
commit 9166b6ed74
3 changed files with 5 additions and 3 deletions

View File

@@ -313,6 +313,7 @@ def logbookentry(request, date, slug):
# start = time.time()
trips = LogbookEntry.objects.filter(date=date) # all the trips not just this one
this_logbookentry = trips.filter(date=date, slug=slug)
year = slug[:4]
if this_logbookentry:
if len(this_logbookentry) > 1:
@@ -329,7 +330,8 @@ def logbookentry(request, date, slug):
return render(
request,
"logbookentry.html",
{"logbookentry": this_logbookentry,"trips": trips, "svxothers": svxothers, "wallets": wallets},
{"logbookentry": this_logbookentry,"trips": trips,
"svxothers": svxothers, "wallets": wallets, "year": year},
)
else:
msg = f' Logbook entry slug:"{slug}" not found in database on date:"{date}" '