Restricts access to specific urls based on DEBUG status by responded with a specific view or raising a 404
Project description
Restricted Paths
Description
Restricts access to specific urls based on DEBUG status by responded with a specific view or raising a 404.
Installation
pip install django-restricted-paths
Usage
in settings.py:
RESTRICTED_PATHS = {
"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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40dc3d7b28651484ac5380df521eaebe8b2cb3a532c2bb3df2541727ae90d6a3 |
|
MD5 | 70d2caf7cd1a5aea7b2a6b64265703bd |
|
BLAKE2b-256 | 0e5a070987bb2f8d375d340583c83589b56dc266697aba7a9d75c0fbe09363ad |
Close
Hashes for django_restricted_paths-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d7f29a8dbb058d9d0777ac361cd699001de825be60f6b9374fbb3fef5242f04 |
|
MD5 | eef266502809714712c7ab20f1dee010 |
|
BLAKE2b-256 | 2d756c019f328f551ac2f37f03c47ec4b5f1303709fdf136a2a26c51dc54b319 |