gpt4 book ai didi

python - 如何在 django 1.11 中设置 session 超时

转载 作者:太空宇宙 更新时间:2023-11-03 14:34:53 24 4
gpt4 key购买 nike

我正在尝试在 django==1.11 中为管理员设置 session time_out,但它不适用于以下任何一项:

SESSION_EXPIRE_AT_BROWSER_CLOSE= True
SESSION_COOKIE_AGE = 10
SESSION_IDLE_TIMEOUT = 10
SESSION_SAVE_EVERY_REQUEST = True
SESSION_INACTIVITY_TIMEOUT_IN_SECONDS = 10
AUTO_LOGOUT_DELAY = 10

最佳答案

你注意到这一点了吗?

Note

Some browsers (Chrome, for example) provide settings that allow users to continue browsing sessions after closing and re-opening the browser. In some cases, this can interfere with the SESSION_EXPIRE_AT_BROWSER_CLOSE setting and prevent sessions from expiring on browser close. Please be aware of this while testing Django applications which have the SESSION_EXPIRE_AT_BROWSER_CLOSE setting enabled.

关于python - 如何在 django 1.11 中设置 session 超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47030708/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com