django-errors is a Django application for handling server errors.
Project description
django-errors
GitHub
Test
Check Demo Project
Requirements
- Python 3.8+ supported.
- Django 3.2+ 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-1.5.5.tar.gz
(34.9 kB
view hashes)
Built Distributions
django_errors-1.5.5-py3.11.egg
(19.6 kB
view hashes)
django_errors-1.5.5-py3.10.egg
(18.6 kB
view hashes)
django_errors-1.5.5-py3.9.egg
(18.6 kB
view hashes)
django_errors-1.5.5-py3.8.egg
(18.6 kB
view hashes)
Close
Hashes for django_errors-1.5.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eed0cb980ac5bdc067bbbd4301f4337de8f79a825c5fe195584996a1ee60e585 |
|
MD5 | a8cea8042498f5b555508ab7497371c1 |
|
BLAKE2b-256 | cbbd26948fa351cda8568ad82a0dc0031076ded5af1e4dfd2a3b4c737d428798 |