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

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page