catch exceptions patching the debugview in django, for better support for old versions of django.