salexkidd / django-malice

django-malice is a simple Django app that provides an easy and simple View Error(403, 404, 500) and 200 OK Testing for development and production environment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CircleCI

django-malice

django-malice is a simple Django app that provides an easy and simple View Error(403, 404, 500) and 200 OK Testing for development and production environment.

Feature

  • It can cause an 403, 404, 500 error.

Motivation

How do you check error with sentry.io or other error collecting service?

Maybe your django project don't report issue to error collecting service.

You can cause an error by django-malice and check collection service behavior.

Dependencies

  • python 3.6, 3.7
  • django >= 1.11 (Support 2.0)

Quick start

  1. Install django-malice
pip install django-malice
  1. Add "malice" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
    ...
    'malice',
]

And you want gets some malice's errors by not admin user, please set "MALICE_ADMIN_ONLY" is False

MALICE_ADMIN_ONLY = False
  1. Include the malice URLconf in your project urls.py like this:
url(r'^malice/', include('malice.urls', namespace='malice')),

# or (django 2.0)

path('malice/', include('malice.urls', namespace='malice')),

If you don't want production envirionment, like this.

from django.conf import settings

if settings.DEBUG:
    urlpatterns += [
        url(r'^malice/', include('malice.urls', namespace='malice'))
    ]

# or (django 2.0)

if settings.DEBUG:
    urlpatterns += [
        path('malice/', include('malice.urls', namespace='malice'))
    ]

  1. Run runserver and open below url
./manage.py runserver 0.0.0.0:8000

About

django-malice is a simple Django app that provides an easy and simple View Error(403, 404, 500) and 200 OK Testing for development and production environment.

License:MIT License


Languages

Language:Python 100.0%