Skip to main content

Tiny error reporting middleware(s) for Django.

Project description

https://img.shields.io/twitter/follow/gagliardi_vale?style=social https://github.com/valentinogagliardi/django-monitus/workflows/Tox%20tests/badge.svg

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)

Uploaded Source

Built Distribution

django_monitus-1.0.0-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

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