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:


3. Start the development server and visit, 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.

Files for django-glrm, version 1.1.3
Filename, size File type Python version Upload date Hashes
Filename, size django-glrm-1.1.3.tar.gz (13.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page