From 9166b6ed74808d733314c1f7f021805894bc90f9 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Wed, 24 Jul 2024 21:55:46 +0200 Subject: [PATCH] fix year menu, fix name display, fix no of entries --- core/views/logbooks.py | 4 +++- parsers/logbooks.py | 2 +- templates/logbookentry.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/views/logbooks.py b/core/views/logbooks.py index 5f560e8..75f5c7d 100644 --- a/core/views/logbooks.py +++ b/core/views/logbooks.py @@ -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}" ' diff --git a/parsers/logbooks.py b/parsers/logbooks.py index 69a2850..63533f3 100644 --- a/parsers/logbooks.py +++ b/parsers/logbooks.py @@ -60,7 +60,7 @@ LOGBOOKS_DIR = "years" # subfolder of settings.EXPOWEB ENTRIES = { "2024": 41, - "2023": 91, + "2023": 112, "2022": 94, "2019": 55, "2018": 95, diff --git a/templates/logbookentry.html b/templates/logbookentry.html index a3681b8..1a0f198 100644 --- a/templates/logbookentry.html +++ b/templates/logbookentry.html @@ -43,7 +43,7 @@ th, td { {% else %} {% endif %} - {{personlogentry.nickname_used}} ({{personlogentry.personexpedition.person}}) + {{personlogentry.nickname_used}}