Skip to main content

Middleware to expire sessions after specific amount of time

Project description

Status

https://travis-ci.org/LabD/django-session-timeout.svg?branch=master http://codecov.io/github/LabD/django-session-timeout/coverage.svg?branch=master https://img.shields.io/pypi/v/django-session-timeout.svg

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

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

django-session-timeout-0.0.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

django_session_timeout-0.0.1-py2.py3-none-any.whl (4.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-session-timeout-0.0.1.tar.gz.

File metadata

File hashes

Hashes for django-session-timeout-0.0.1.tar.gz
Algorithm Hash digest
SHA256 64e275c1bc4f750ea9d81ed8ebba802548fcf54f9adf16ee0f74d35f948d8959
MD5 0834cc42915d4925133c4096472b910c
BLAKE2b-256 6cecdc82189b9e5f48e18a4fbf5718d86bab9503108f3e460fa4d5d13a25b382

See more details on using hashes here.

File details

Details for the file django_session_timeout-0.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_session_timeout-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8737b8a2933a5041725a9fa76100af9ecb311cabcdbbd427420cf927e5e0a48c
MD5 81bdb7434dda3fcec6efde52039afeeb
BLAKE2b-256 4783f7aa2e80f8c5261b8ae7d4324df8ba7bc3ee96e2acf042982ff82cd00f26

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page