summaryrefslogtreecommitdiffstats
path: root/core/views/expo.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2025-06-25 23:39:41 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2025-06-25 23:39:41 +0300
commitc89e8cea90aa0493cbdecce5c4f9a8bd5dce2c17 (patch)
tree10dcbbea7a3a3a86513e8e54d0dc2547917de0ee /core/views/expo.py
parentc29548db0134d85af56b822dac52502a39d69119 (diff)
downloadtroggle-c89e8cea90aa0493cbdecce5c4f9a8bd5dce2c17.tar.gz
troggle-c89e8cea90aa0493cbdecce5c4f9a8bd5dce2c17.tar.bz2
troggle-c89e8cea90aa0493cbdecce5c4f9a8bd5dce2c17.zip
remaining shared-use machine cookie tyimeouts set
Diffstat (limited to 'core/views/expo.py')
-rw-r--r--core/views/expo.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/views/expo.py b/core/views/expo.py
index 723f772..a77ecf6 100644
--- a/core/views/expo.py
+++ b/core/views/expo.py
@@ -493,8 +493,8 @@ def editexpopage(request, path):
if not filefound or result != html: # Check if content changed at all
edit_response = HttpResponseRedirect(reverse("expopage", args=[path])) # Redirect after POST
- edit_response.set_cookie('editor_id', editor, max_age=get_cookie_max_age()) # cookie expires after get_cookie_max_age() seconds
- print(f"Cookie set: {editor} for {get_cookie_max_age()/(3600)} hour(s)")
+ edit_response.set_cookie('editor_id', editor, max_age=get_cookie_max_age(request)) # cookie expires after get_cookie_max_age(request) seconds
+ print(f"Cookie set: {editor} for {get_cookie_max_age(request)/(3600)} hour(s)")
try:
change_message = pageform.cleaned_data["change_message"]
write_and_commit([(filepath, result, "utf-8")], f"{change_message} - online edit of {path}", editor)
@@ -610,7 +610,7 @@ def edittxtpage(request, path, filepath):
savepath = "/" + path
print(f"redirect {savepath}")
response = redirect(savepath) # Redirect after POST
- response.set_cookie('editor_id', editor, max_age=get_cookie_max_age()) # cookie expires after get_cookie_max_age() seconds
+ response.set_cookie('editor_id', editor, max_age=get_cookie_max_age(request)) # cookie expires after get_cookie_max_age(request) seconds
return response
else: