Middleware for only allowing access to staff members
Project description
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.
Source Distribution
django-curtains-0.4.2.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for django_curtains-0.4.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec52a6567484ad5c512299d5e14eec6008cac25231c63d4a2b7778e4452035bc |
|
MD5 | 0e6a0449ea1fe79b119efb25be71b540 |
|
BLAKE2b-256 | b2635b992bd8702142fd3cd50cd94ff0da2ff8588d3c33991cbe20dafd46ffe5 |