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

Metadata

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 Provenance
django-restricted-paths-1.4.0.tar.gz 3.1 kB Without provenance 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

Security for django-restricted-paths 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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