Skip to main content

DJANGO EXCEPT CATCHER

django-except-catcher is a simple tool to catch and view exceptions in a production django website.

django-except-catcher Logo

django-except-catcher Logo

Exceptions are stored and listed so you can find similar errors and look their “yellow error page”, just like in django’s debug error page.

It does not require instalation of any daemon in order to work, just install a regular django module.

Inspired in django’s AdminMailHandler.

INSTALATION

Install django-except-catcher:

pip install django-except-catcher

Add to urls.py:

path('', include(('except_catcher.urls', 'except_catcher'), namespace="except_catcher"))

add to settings.py:

INSTALLED_APPS = [
    ...
    'except_catcher',
]

LOGGING = {
    ...
    'handlers': {
            'error_catcher': {
            'level': 'ERROR',
            'class': 'except_catcher.handlers.CatchExceptionHandler',
        },
    ...
    'loggers': {
        'django.request': {
            'handlers': [ 'error_catcher'],
            'level': 'ERROR',
            'propagate': False,
        },
    }
}

run migrations:

./manage.py migrate except_catcher

Now go to url:

http://localhost:8000/errors/

You can purposely throw an exception in the url:

http://localhost:8000/test-exception/

Only the superuser have access to these reports.

Sure the UI is ugly. That’s ok since only sysadmins are supposed to see it anyway.

Metadata

Release files for django-except-catcher 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-except-catcher 0.1.1
File Size Uploaded Provenance Actions
django-except-catcher-0.1.1.tar.gz 36.2 kB Without provenance Details for django-except-catcher-0.1.1.tar.gz

Release files / django-except-catcher-0.1.1.tar.gz

Download URL django-except-catcher-0.1.1.tar.gz
Size 36.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a17045185f3ab863e4937faa416998e440240c1e9445e7c34183354d860ef89c
BLAKE2b-256 checksum
How to use checksums
999200d592f0b58ac2f1a0158ea895efeef690c6aa36cdb6654afd08eae1ec54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3

Security for django-except-catcher 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page