Wrapper Views for common errors
Project description
django-errors
Pypi
pip install django-errors
GitHub
Test
Configurations
- 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
cd example
python manage.py runserver
Now browser the app @ http://127.0.0.1:8000
About Landing Page Errors
http://www.onextrapixel.com/2011/03/09/the-secret-of-a-successful-error-page-with-35-amazing-404-page-designs/ http://www.onextrapixel.com/2011/10/21/applying-defensive-design-for-the-web/
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.4b2.tar.gz
(9.4 kB
view hashes)
Built Distributions
django_errors-0.4b2-py3.9.egg
(23.5 kB
view hashes)
django_errors-0.4b2-py3.8.egg
(23.5 kB
view hashes)
django_errors-0.4b2-py3.7.egg
(23.5 kB
view hashes)