Middleware for Django that automatically expires user sessions after a configurable period of inactivity. Version 0.1.0 is the latest, with an unpredictable release cadence.
pip install django-session-timeoutVerified import paths — ran on the pinned version, not inferred.
Add SessionTimeoutMiddleware after AuthenticationMiddleware and set SESSION_EXPIRE_SECONDS in settings.
Ensure your MIDDLEWARE list has 'django_session_timeout.middleware.SessionTimeoutMiddleware' after 'django.contrib.sessions.middleware.SessionMiddleware' and 'django.contrib.auth.middleware.AuthenticationMiddleware'.
Explicitly set SESSION_EXPIRE_SECONDS in your Django settings, e.g., SESSION_EXPIRE_SECONDS = 1800.
If you want consistent session timeout, set both SESSION_COOKIE_AGE and SESSION_EXPIRE_SECONDS to the same value.