Skip to main content

Django application for handling server errors.

Project description

django-errors PyPi license

PyPi status PyPi version PyPi python version PyPi downloads PyPi downloads PyPi downloads

GitHub GitHub release GitHub release

Test codecov.io pre-commit.ci status gitthub.com

Check Demo Project

  • Browser the demo app on-line on Heroku
  • Check the demo repo on GitHub

Requirements

  • Python 3.8+ supported.
  • Django 3.2+ supported.

Setup

  1. Install from pip:
pip install django-errors
  1. modify settings.py by adding the app to INSTALLED_APPS:
INSTALLED_APPS = [
    # ...
    "django_errors",
    # ...
]
  1. Finally, modify your project urls.py with handlers for all errors:
# ...other imports...
from django_errors import views as errors_views

urlpatterns = [
    # ...other urls...
]

handler400 = errors_views.custom_400
""" Handle 400 error """

handler403 = errors_views.custom_403
""" Handle 403 error """

handler404 = errors_views.custom_404
""" Handle 404 error """

handler500 = errors_views.custom_500
""" Handle 500 error """

Run Example Project

git clone --depth=50 --branch=django-errors https://github.com/DLRSP/example.git DLRSP/example
cd DLRSP/example
python manage.py runserver

Now browser the app @ http://127.0.0.1:8000

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-errors-2.1.0.tar.gz (37.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_errors-2.1.0-py2.py3-none-any.whl (19.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-errors-2.1.0.tar.gz.

File metadata

  • Download URL: django-errors-2.1.0.tar.gz
  • Upload date:
  • Size: 37.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for django-errors-2.1.0.tar.gz
Algorithm Hash digest
SHA256 451b1e1a152b68a9040a5038f9bc7d85ffeaa60765b9c4d86e663915d0bb4654
MD5 86a3d2151e6499a34bbe7228a453d011
BLAKE2b-256 aef02fc05d627c6e295c01f9138de2206f66baa4282e21ee1f971e8c1d7887c0

See more details on using hashes here.

File details

Details for the file django_errors-2.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: django_errors-2.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for django_errors-2.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0fbc632fb0ddf8e58f4afdbd54b9e3064878d0d49ca7dad13aad300109d2151f
MD5 1ec103a3cfd67cfa9ce20030ea848b00
BLAKE2b-256 d64c7d60df734badbbac0b0003ed90efe8eb07f90391e4914cf2c899f83313d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page