django-errors is a Django application for handling server errors.
Project description
django-errors
GitHub
Test
Check Demo Project
Requirements
- Python 3.6 to 3.10 supported.
- Django 2.2 to 4.0 supported.
Setup
- Install from pip:
pip install django-errors
- modify
settings.py
by adding the app toINSTALLED_APPS
:
INSTALLED_APPS = [
# ...
"django_errors",
# ...
]
- 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
Release history Release notifications | RSS feed
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-0.13.0.tar.gz
(29.7 kB
view hashes)
Built Distributions
django_errors-0.13.0-py3.8.egg
(19.0 kB
view hashes)
Close
Hashes for django_errors-0.13.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37b6b0ebaad36606dcfbc06da6ad202b6faafcb97b8eccd8f27dec49d06935d7 |
|
MD5 | 56c3a5893c066911f770323a2144d8e6 |
|
BLAKE2b-256 | 33743ffa27796624fd3ff52eac60df4c60f500e07293632ce6a72ed385231473 |