Skip to main content

A Django middleware that make all views and URLs login required.

Project description

Django Global Login Required Middleware (django-glrm) is a Django middleware that make all views and URLs login required.

It’s common in Django that most of the site’s pages are protected, with just a few exceptions of pages that remain public (e.g. login page, etc.). It can be quite tedious to decorate all of the views with @login_required, and it can be easy to forget to decorate some of them.

So, you can use Django Global Login Required Middleware to make all page login required excep some of them.

Documentation is avalible at Read The Docs.

Quick start

  1. Install Django Global Login Required Middleware:

    $ pip install django-glrm
  2. Add “global_login_required.GlobalLoginRequiredMiddleware” to your MIDDLEWARE setting like this:

    MIDDLEWARE = [
        ...
        'global_login_required.GlobalLoginRequiredMiddleware',
    ]

3. Start the development server and visit http://127.0.0.1:8000/, now all your pages are login required and you will see the login page.

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-glrm-1.1.2.tar.gz (16.3 kB view details)

Uploaded Source

File details

Details for the file django-glrm-1.1.2.tar.gz.

File metadata

  • Download URL: django-glrm-1.1.2.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-glrm-1.1.2.tar.gz
Algorithm Hash digest
SHA256 aca399e8792cef4f3cb87dbd39e7425a93a82ebc9d0b5f72e0e5cd89b60de73e
MD5 c3203bc3d7d0aab242650872276987c7
BLAKE2b-256 a1fa623209130a408a2e1f1df5631d46042a97450a92ee333e711574c8949035

See more details on using hashes here.

Supported by

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