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.3.0.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for django_curtains-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 330551ba4c60627c6ec183f2b31cff74512280f7f9800e98184f7754b40584de |
|
MD5 | 78fb05aaa6002316766792ef771c9b21 |
|
BLAKE2b-256 | d98d675bfaf220ebf4ee5ffa07344bf0fba75923d1465e333dd9a13dd1e93782 |