Middleware to expire sessions after specific amount of time
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-session-timeout-0.0.3.tar.gz
.
File metadata
- Download URL: django-session-timeout-0.0.3.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 339ce15fabe551a9dda5e6be484cf5ecf6f5be09665ca0907c06682cef0a146e |
|
MD5 | cda94baa87a6136e97907260f4c34e4f |
|
BLAKE2b-256 | 7107b507eb4208aafca270116def9c1c694c37cd2e56f3f995247685ce2bb91a |
File details
Details for the file django_session_timeout-0.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: django_session_timeout-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86c150f1cacd9e72748d85c79c30d3b3aa96d6fb00797a133e7310f880d68579 |
|
MD5 | c3e0dde4918cafde343a1bfef758620d |
|
BLAKE2b-256 | 16f76ca46271bcdfa1178b19df50f917c45235044cbb80aa530938586c281203 |