View gist:4545876
if settings.DEBUG:
from django.core.signals import got_request_exception
import traceback
def _print_request_error(sender, request, **kwargs):
traceback.print_exc()
got_request_exception.connect(_print_request_error)