diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2025-06-14 20:36:31 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2025-06-14 20:36:31 +0300 |
commit | 40fb066e2be579f07e8219bfa2306d66278b4b00 (patch) | |
tree | 992f58f2ac0d1fe8cf2c5888d1a957f2272bc2ee /core/views/survex.py | |
parent | d8cdf7bc5ac1d258b36a8548c354e82ca314197a (diff) | |
download | troggle-40fb066e2be579f07e8219bfa2306d66278b4b00.tar.gz troggle-40fb066e2be579f07e8219bfa2306d66278b4b00.tar.bz2 troggle-40fb066e2be579f07e8219bfa2306d66278b4b00.zip |
refactoring cookie age as a function not a constant
Diffstat (limited to 'core/views/survex.py')
-rw-r--r-- | core/views/survex.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/views/survex.py b/core/views/survex.py index fe95825..3c7e26a 100644 --- a/core/views/survex.py +++ b/core/views/survex.py @@ -18,7 +18,7 @@ from troggle.core.models.logbooks import LogbookEntry from troggle.core.models.survex import SurvexBlock, SurvexFile #, SurvexDirectory from troggle.core.models.wallets import Wallet from troggle.core.utils import ( - COOKIE_MAX_AGE, + get_cookie_max_age, add_commit, current_expo, get_editor, @@ -441,8 +441,8 @@ def svx(request, survex_file): else: edit_response = render(request, "svxfile.html", vmap) - edit_response.set_cookie('editor_id', editor, max_age=COOKIE_MAX_AGE) # cookie expires after COOKIE_MAX_AGE seconds - print(f"Cookie reset: {editor} for another {COOKIE_MAX_AGE/3600} hours") + edit_response.set_cookie('editor_id', editor, max_age=get_cookie_max_age()) # cookie expires after get_cookie_max_age() seconds + print(f"Cookie reset: {editor} for another {get_cookie_max_age()/3600} hour(s)") return edit_response |