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-2.3.5.tar.gz
(37.2 kB
view details)
Built Distribution
File details
Details for the file django-errors-2.3.5.tar.gz
.
File metadata
- Download URL: django-errors-2.3.5.tar.gz
- Upload date:
- Size: 37.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be999f837dfd75200c060b189a6d73660bf345113bfe8e17b84e51fd78faa6e9 |
|
MD5 | 650c0aec5eb0435d6791fce5cbef7143 |
|
BLAKE2b-256 | e1660a91ba4e74b69fd559f0f4579f5a727fa288b25260f627f539cc41537fa0 |
File details
Details for the file django_errors-2.3.5-py2.py3-none-any.whl
.
File metadata
- Download URL: django_errors-2.3.5-py2.py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a316342c25204d00aee8efb61b01c60dbaab408bd81dce390735d2b067a8ac87 |
|
MD5 | f3ecf634a32e832da9e693715ebd31d2 |
|
BLAKE2b-256 | f77301c75b07959ccffb2a02d6152f604547bcde2da1a9ffc4cb85fe257f289c |