Skip to main content

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"
)

Release files for django-restricted-paths 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-restricted-paths 1.4.0
File Size Uploaded
django-restricted-paths-1.4.0.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-restricted-paths 1.4.0
File Interpreter ABI Platform
django_restricted_paths-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / django-restricted-paths-1.4.0.tar.gz

Download URL django-restricted-paths-1.4.0.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
69fcbc2ee32e6819da8864918a25d61146ba7e4a51bc49a8c57ae85e4fa15adc
BLAKE2b-256 checksum
How to use checksums
44fb88f92c1e34b4e2c5630a12d90c77fac451172811fe1959e3f496db19554b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / django_restricted_paths-1.4.0-py3-none-any.whl

Download URL django_restricted_paths-1.4.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4686a5a5c271efea6334a34daec08c5ca9a77961544c9094c82bdbdf7c4c6d4
BLAKE2b-256 checksum
How to use checksums
abe4890312c90800185e3a37c66e4e8931327c78347e8e06fa4570ee81f7ca61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page