django-blarg

Django 404 and 500 pages the blarg way.


Keywords
django-blarg
License
BSD-3-Clause
Install
pip install django-blarg==0.1.4

Documentation

django-blarg

https://badge.fury.io/py/django-blarg.png

Django 404 and 500 pages the blarg way.

Like https://github.com/404 and https://github.com/500, but for Django.

Warnings

  • Not yet tested in production anywhere.
  • No tests yet!

Usage

Get the package:

pip install django-blarg

Wire into your project's root URLConf:

from blarg import error_500, error_404

urlpatterns += patterns("",
    url(r"^500$", error_500, name="error_500"),
    url(r"^404$", error_404, name="error_404"),
)

Fire up the Django test server

python manage.py runserver

Test it out!

Troubleshooting

You probably already have them, but you'll need 500.html and 404.html templates in the the root of a templates directory.

Features

  • The 500 error template is 100% isolated from Django's template mechanisms.
  • Works with Django 1.0 upwards. Maybe for earlier, test it and see!
  • Works with every version of Python ever supported by Django.
  • Works on every HTTP method.

Support this Epic Project