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.1.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for django_curtains-0.4.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98301884edc9fce48a0076b99c5e0fd9bf0327cd47b9673cd44fda4d5d9e8d45 |
|
MD5 | 2c9c8bc63455b0acc6328ace785e8591 |
|
BLAKE2b-256 | 71acca1c6626dcb2deafd95a7dadfdabea111f6ac59c39d73e136fcb0f4a05ce |