Skip to main content

django-preventconcurrentlogins

Django middleware that prevents multiple concurrent logins. If a user is already logged into the Django application and tries to log in somewhere else, the previous session is deleted.

This package is based on code from http://stackoverflow.com/a/1814797 and https://gist.github.com/peterdemin/5829440.

Usage

  1. Add “preventconcurrentlogins” to your INSTALLED_APPS settings like this:

    ```python
        INSTALLED_APPS = {
            ...
                'preventconcurrentlogins',
        }
    ```
  2. Add “preventconcurrentlogins.middleware.PreventConcurrentLoginsMiddleware” to MIDDLEWARE_CLASSES:

    ```python
        MIDDLEWARE_CLASSES = {
            ...
                'preventconcurrentlogins.middleware.PreventConcurrentLoginsMiddleware',
        }
    ```

3. Run python manage.py migrate to create the visitor model that is used to track a users currently active session key.

Metadata

Release files for django-preventconcurrentlogins 0.8.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-preventconcurrentlogins 0.8.2
File Size Uploaded Provenance Actions
django-preventconcurrentlogins-0.8.2.tar.gz 4.3 kB Without provenance Details for django-preventconcurrentlogins-0.8.2.tar.gz

Release files / django-preventconcurrentlogins-0.8.2.tar.gz

Download URL django-preventconcurrentlogins-0.8.2.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9cb45fcd63edeec55e5ac29bbd2ee96974dc2a72d74ab88088dbf6a1f52978e9
BLAKE2b-256 checksum
How to use checksums
bc90ed3b82373bb8150f22e53cf45329f302b440a28bf0773b7bd76681106e0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-preventconcurrentlogins 0.8.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.8.2 This release

1 release file No provenance

0.8

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page