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.

Source Distribution

django-curtains-0.4.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

django_curtains-0.4.0-py2.py3-none-any.whl (6.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-curtains-0.4.0.tar.gz.

File metadata

  • Download URL: django-curtains-0.4.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.10.0 pkginfo/1.2.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.7

File hashes

Hashes for django-curtains-0.4.0.tar.gz
Algorithm Hash digest
SHA256 27e0fcf82473b32fcaec324ed268f76b6304cf11482c4fa6909a9ddcf9bd6aab
MD5 b42cda4e5926537a9b3508ba59971787
BLAKE2b-256 63e5f497f298c4c894103d11465fef0269d03c4d652037c4b2c21a0ce2ba4871

See more details on using hashes here.

File details

Details for the file django_curtains-0.4.0-py2.py3-none-any.whl.

File metadata

  • Download URL: django_curtains-0.4.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.10.0 pkginfo/1.2.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.7

File hashes

Hashes for django_curtains-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 249a5ec7d67899e0c2bad16ce32fa18863824f9dba25aeb3ae24dcef059081a6
MD5 ac312e873601fb3a99dfdccc1248c873
BLAKE2b-256 a7268009ddc003500128bace92814680d492ba82d8fab7ecdd0e2edef04ea189

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page