Skip to main content

Middleware for only allowing access to staff members

Project description

https://travis-ci.org/matthiask/django-curtains.svg?branch=master

Usage

  • Install the module using pip install django-curtains
  • Add one of the included middleware to MIDDLEWARE

curtains.middleware.only_staff

Only allows access to authenticated staff members. The ONLY_STAFF_EXEMPT setting (defaults to ('/admin', 'accounts') allows excluding URLs from the middleware.

curtains.middleware.basic_auth

Requires basic authorization to access the site. The BASIC_AUTH_CREDENTIALS setting should be set to a list containing the username and the password for basic authorization, e.g. BASIC_AUTH_CREDENTIALS = ['early', 'birds'].

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
django_curtains-0.3.0-py2.py3-none-any.whl (5.2 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Sep 12, 2018
django-curtains-0.3.0.tar.gz (4.3 kB) Copy SHA256 hash SHA256 Source None Sep 12, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page