Django sets login duration
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.