Skip to main content

Unique session handler for Django

Project description

Key features

  • Ensure only one open session per user

  • Extends the standard Django database session backend

  • Automatically logout previously existing sessions

  • Optionally enforce a timeout before allowing a new login

  • Works with Django 1.4+

How to use

  1. Add unique_session in INSTALLED_APPS.

  2. Use SESSION_ENGINE = "unique_session.backends.session_backend"

  3. (Optional) Add "UNIQUE_SESSION_BLOCK_TIME = <seconds>" to enable the timeout.

  4. (Optional) Add "UNIQUE_SESSION_WHITELIST = (<uid1>, <uid2>,...)" to whitelist some users (from their numeric id) so that they’ll be exempt to the blocking mechanism.

  5. Run syncdb.

License

GPLv3

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-unique-session-1.0.tar.gz (15.8 kB view hashes)

Uploaded Source

Built Distribution

django_unique_session-1.0-py3-none-any.whl (16.8 kB view hashes)

Uploaded Python 3

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