Skip to content

Instantly share code, notes, and snippets.

View highcat's full-sized avatar

Alex Lokk highcat

View GitHub Profile
@highcat
highcat / gist:4545876
Last active December 11, 2015 04:29
Django - print traceback to console in debug mode
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)
def x():
print "hello world"