Redirect forbidden requests to a login page
Project description
datasette-redirect-forbidden
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for datasette-redirect-forbidden-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b981018e27dd227554d55b664559249667243dc20b0d596be1a02c748f1cf144 |
|
MD5 | 522dfee1f98ffb2096670bde8ec8872c |
|
BLAKE2b-256 | 22f16e757423da2563206abd6445a5bc8b6ab38edd7dbf7b1500380175eda3fa |
Close
Hashes for datasette_redirect_forbidden-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c3579e76c94fdf9b39c57ac62e314081f6d6f69a7beae38c7cbb37934f6bfc7 |
|
MD5 | 8b25809f7d6d08ce7e7d63867246b9a6 |
|
BLAKE2b-256 | cf22a437fc6fb97a39056ededbfaf02c17d3fd5e8c33fb4546bc03344b2567c0 |