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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-restricted-paths-1.4.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_restricted_paths-1.4.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file django-restricted-paths-1.4.0.tar.gz.

File metadata

  • Download URL: django-restricted-paths-1.4.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for django-restricted-paths-1.4.0.tar.gz
Algorithm Hash digest
SHA256 69fcbc2ee32e6819da8864918a25d61146ba7e4a51bc49a8c57ae85e4fa15adc
MD5 78709e6d92e6b92f8e5618f38e477849
BLAKE2b-256 44fb88f92c1e34b4e2c5630a12d90c77fac451172811fe1959e3f496db19554b

See more details on using hashes here.

File details

Details for the file django_restricted_paths-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: django_restricted_paths-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for django_restricted_paths-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a4686a5a5c271efea6334a34daec08c5ca9a77961544c9094c82bdbdf7c4c6d4
MD5 24b86f26af8129c285fafe0409f3f08f
BLAKE2b-256 abe4890312c90800185e3a37c66e4e8931327c78347e8e06fa4570ee81f7ca61

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page