Tuesday, August 1, 2017

Set the default session expired time in Django

Set the default session expired time in Django


In Django, you can set the expired time of session by this setting, for example after 10 minutes:

SESSION_COOKIE_AGE = 10 * 60

In addition, if you want the session will be expired when the user closes her browser, you can set:

SESSION_EXPIRE_AT_BROWSER_CLOSE = True


download file now

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.