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.3.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

django_curtains-0.3.0-py2.py3-none-any.whl (5.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: django-curtains-0.3.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for django-curtains-0.3.0.tar.gz
Algorithm Hash digest
SHA256 07766216a4d99962d5f734d1c3b555d32d240240e7fa1f969d2f076b3214b398
MD5 5447829d0558d3d2d1af59f87ed655f5
BLAKE2b-256 5e1de0ca5a0b0df573890db46bb389cf1eb979f366e1f2ac31fa058b83633937

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_curtains-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for django_curtains-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 330551ba4c60627c6ec183f2b31cff74512280f7f9800e98184f7754b40584de
MD5 78fb05aaa6002316766792ef771c9b21
BLAKE2b-256 d98d675bfaf220ebf4ee5ffa07344bf0fba75923d1465e333dd9a13dd1e93782

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