Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Django sets login duration

Shulou Source: shulou.com Published: 2022-06-03 08:14:40 11月23日 Update

Add the following configuration to the settings file

SESSION_SAVE_EVERY_REQUEST = True

SESSION_COOKIE_AGE=60*30 for 30 minutes.

SESSION_EXPIRE_AT_BROWSER_CLOSE = False session cookie can be maintained in the user's browser. True: if you close the browser, the Cookie becomes invalid.

Tags: Browser browsing expiration file user configuration duration login Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Technology MariaDB vpn Shulou Tech Info