Session Idle Timeout in Django

To set session timeout once the user idled for several times, we just need set these config in “settings.py” in our project.

SESSION_COOKIE_AGE = 60 * 30  # Session will expiry after 30 minutes idle.
SESSION_SAVE_EVERY_REQUEST = True

Reference: http://stackoverflow.com/a/2539307/1936697

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.