DJANGO EXCEPT CATCHER
django-except-catcher is a simple tool to catch and view exceptions in a production django website.
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.
For an example out of the box, take a look here.
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 = {
'version': 1,
'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.
Metadata
Release files for django-except-catcher 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-except-catcher-1.0.0.tar.gz | 31.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_except_catcher-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 67.0 kB
Release files / django-except-catcher-1.0.0.tar.gz
| Download URL | django-except-catcher-1.0.0.tar.gz |
|---|---|
| Size | 31.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2847e8703f617675b9b80fcf34820f63c7ef62a036e042ededff942ac4fe802d
|
|
BLAKE2b-256 checksum How to use checksums |
b6fe9afbcbbe3a37ef5993c92b028fd5e85e3cac262ce605dce9d6b69a51e725
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3
|
Release files / django_except_catcher-1.0.0-py3-none-any.whl
| Download URL | django_except_catcher-1.0.0-py3-none-any.whl |
|---|---|
| Size | 35.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
249bbcde5d1d120ee251373d39586b189e888d8fa54091f266d46559250e92fc
|
|
BLAKE2b-256 checksum How to use checksums |
8647e539b9c38bbc64f02e62ed481dd0e76c9239c955c4a33dc668183aa4b3dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3
|