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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file django-unique-session-1.0.tar.gz.

File metadata

  • Download URL: django-unique-session-1.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for django-unique-session-1.0.tar.gz
Algorithm Hash digest
SHA256 bcc87aadf681dd1a87a22cd92014a42a723936e6fec7af0db1d9505fe985a451
MD5 985dd42cfa441a317b9a256726c4f155
BLAKE2b-256 c43ebe049f63ef593359612ffd43f2880581bd449e1d919c462fbb0bf28a6d2f

See more details on using hashes here.

File details

Details for the file django_unique_session-1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_unique_session-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 251a5cddc5aaf39f5ad8edecae4b93b787d1e290cf5ddb98232f3174002c61a1
MD5 ea378a7d1d088f5594fbde133aacd5d8
BLAKE2b-256 ee40e3b5fb136e811ada81d4c560f8c6136813e0e4034409c5a9e82d6e7ac5d5

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