Tiny error reporting middleware(s) for Django.
Project description
Tiny error reporting middleware(s) for Django. Includes the following middlewares:
Error403EmailsMiddleware: sends an email to ADMINS on 403.
FailedLoginMiddleware: sends an email to ADMINS on failed logins.
Requirements
Tested on Python 3.8.
Tested on Django 3.0 and 3.1.
Setup
Install from pip:
python -m pip install django-monitus
Then add it to the list of installed apps:
INSTALLED_APPS = [
...
"monitus"
...
]
Enable the desired middleware:
MIDDLEWARE = [
...
"monitus.middleware.Error403EmailsMiddleware"
...
]
Setup ADMINS in your settings:
MANAGERS = [("Juliana C.", "juliana.crain@dev.io")]
Development and testing
To test on your local machine with Postgres, make sure to have a role with enough privileges:
CREATE ROLE monitustestuser WITH LOGIN PASSWORD 'monitustestpassword' CREATEDB;
Then run
DATABASE_URL=postgres://monitustestuser:monitustestpassword@localhost/monitustestdb tox
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-monitus-1.0.0.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for django_monitus-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f9015f126aa7e5734926b69d7f2a6cedeb3fd4bb8b570f6f8c8c3ed72d193f4 |
|
MD5 | 1f8c6f63af019c7e721c8dd2a3b9d193 |
|
BLAKE2b-256 | 6b08a651e4a7afa16cc4232182a6d37d5490fea9c22e599c1976e8fabf57067d |