diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2022-03-24 20:59:36 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2022-03-24 20:59:36 +0000 |
commit | 3617f9b6d9146f9f6955e604b209244ef9c2ee21 (patch) | |
tree | c6dfde5dca8c49afbdd534ea55e39d760e372173 /core | |
parent | 158918898873e6d6c409da63833d1cb1f4f99758 (diff) | |
download | troggle-3617f9b6d9146f9f6955e604b209244ef9c2ee21.tar.gz troggle-3617f9b6d9146f9f6955e604b209244ef9c2ee21.tar.bz2 troggle-3617f9b6d9146f9f6955e604b209244ef9c2ee21.zip |
bugfix and docum
Diffstat (limited to 'core')
-rw-r--r-- | core/utils.py | 2 | ||||
-rw-r--r-- | core/views/logbooks.py | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/core/utils.py b/core/utils.py index f487c7b..8cbbda2 100644 --- a/core/utils.py +++ b/core/utils.py @@ -24,7 +24,7 @@ from django.template import Context, loader '''This file declares TROG a globally visible object for caches. -TROG is a dictionary holding gloablly visible indexes and cache functions. +TROG is a dictionary holding globally visible indexes and cache functions. It is a Global Object, see https://python-patterns.guide/python/module-globals/ troggle.utils.TROG diff --git a/core/views/logbooks.py b/core/views/logbooks.py index 461ff91..9695d54 100644 --- a/core/views/logbooks.py +++ b/core/views/logbooks.py @@ -52,9 +52,6 @@ def expedition(request, expeditionname): '''Returns a rendered page for one expedition, specified by the year e.g. '2019'. If page caching is enabled, it caches the dictionaries used to render the template page. - The cache is refreshed if '?reload' is present in the requesting URL, which also re-parses the logbook. - By specifying a '0' for the expected number of entries in the logbook cache, this forces the parser to - re-parse the original logbook HTML file. ''' if request.user.is_authenticated: if "reload" in request.GET: @@ -68,7 +65,7 @@ def expedition(request, expeditionname): entry.delete() entries = this_expedition.logbookentry_set.all() print(f'! - expo {expeditionname} {len(entries)} entries after deletion') - LoadLogbookForExpedition(this_expedition, 0) # 0 means re-parse as implies cache expected to be 0 + LoadLogbookForExpedition(this_expedition) logged_in = True else: logged_in = False |