skip to navigation
skip to content

django-session-timeout 0.0.3

Middleware to expire sessions after specific amount of time

Status

Installation

pip install django-session-timeout

Usage

Update your settings to add the SessionTimeoutMiddleware:

MIDDLEWARE_CLASSES = [
    # ...
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django_session_timeout.middleware.SessionTimeoutMiddleware',
    # ...
]

And also add the SESSION_EXPIRE_SECONDS:

SESSION_EXPIRE_SECONDS = 3600  # 1 hour

By default, the session will expire X seconds after the start of the session. To expire the session X seconds after the last activity, use the following setting:

SESSION_EXPIRE_AFTER_LAST_ACTIVITY = True
 
File Type Py Version Uploaded on Size
django-session-timeout-0.0.3.tar.gz (md5) Source 2017-12-14 2KB
django_session_timeout-0.0.3-py2.py3-none-any.whl (md5) Python Wheel py2.py3 2017-12-14 4KB