diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2024-07-24 21:55:46 +0200 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2024-07-24 21:55:46 +0200 |
commit | 9166b6ed74808d733314c1f7f021805894bc90f9 (patch) | |
tree | 21618740e13e980440747fb02e1a6546361e6460 /core/views/logbooks.py | |
parent | 245486666c6f3b9006ca799a49534b95be048a8d (diff) | |
download | troggle-9166b6ed74808d733314c1f7f021805894bc90f9.tar.gz troggle-9166b6ed74808d733314c1f7f021805894bc90f9.tar.bz2 troggle-9166b6ed74808d733314c1f7f021805894bc90f9.zip |
fix year menu, fix name display, fix no of entries
Diffstat (limited to 'core/views/logbooks.py')
-rw-r--r-- | core/views/logbooks.py | 4 |
1 files changed, 3 insertions, 1 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}" ' |