Skip to main content

Redirect forbidden requests to a login page

Project description

datasette-redirect-forbidden

PyPI Changelog Tests License

Redirect forbidden requests to a login page

Installation

Install this plugin in the same environment as Datasette.

$ datasette install datasette-redirect-forbidden

Usage

Add the following to your metadata.yml (or metadata.json) file to configure the plugin:

plugins:
  datasette-redirect-forbidden:
    redirect_to: /-/login

Any 403 forbidden pages will redirect to the specified page.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-redirect-forbidden
python3 -mvenv venv
source venv/bin/activate

Or if you are using pipenv:

pipenv shell

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

datasette-redirect-forbidden-0.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file datasette-redirect-forbidden-0.1.tar.gz.

File metadata

  • Download URL: datasette-redirect-forbidden-0.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for datasette-redirect-forbidden-0.1.tar.gz
Algorithm Hash digest
SHA256 b981018e27dd227554d55b664559249667243dc20b0d596be1a02c748f1cf144
MD5 522dfee1f98ffb2096670bde8ec8872c
BLAKE2b-256 22f16e757423da2563206abd6445a5bc8b6ab38edd7dbf7b1500380175eda3fa

See more details on using hashes here.

File details

Details for the file datasette_redirect_forbidden-0.1-py3-none-any.whl.

File metadata

  • Download URL: datasette_redirect_forbidden-0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for datasette_redirect_forbidden-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9c3579e76c94fdf9b39c57ac62e314081f6d6f69a7beae38c7cbb37934f6bfc7
MD5 8b25809f7d6d08ce7e7d63867246b9a6
BLAKE2b-256 cf22a437fc6fb97a39056ededbfaf02c17d3fd5e8c33fb4546bc03344b2567c0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page