Restricts access to specific urls to staff only by responding with a specific view or raising a 404
Project description
Django Restricted Paths
Description
Restricts access to specific urls to staff only by responding with a specific view or raising a 404.
Installation
pip install django-restricted-paths
Usage
in settings.py:
RESTRICTED_PATHS = {
"ENABLED": not DEBUG,
"PATHS": ("/admin",),
"VIEW": "path.to.view.class.ViewClass",
}
MIDDLEWARE = (
...
"restricted_paths.middleware.RestrictedPathsMiddleware"
)
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
Built Distribution
Close
Hashes for django-restricted-paths-1.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69fcbc2ee32e6819da8864918a25d61146ba7e4a51bc49a8c57ae85e4fa15adc |
|
MD5 | 78709e6d92e6b92f8e5618f38e477849 |
|
BLAKE2b-256 | 44fb88f92c1e34b4e2c5630a12d90c77fac451172811fe1959e3f496db19554b |
Close
Hashes for django_restricted_paths-1.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4686a5a5c271efea6334a34daec08c5ca9a77961544c9094c82bdbdf7c4c6d4 |
|
MD5 | 24b86f26af8129c285fafe0409f3f08f |
|
BLAKE2b-256 | abe4890312c90800185e3a37c66e4e8931327c78347e8e06fa4570ee81f7ca61 |