Loading django/conf/global_settings.py +4 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,10 @@ gettext_noop = lambda s: s DEBUG = False TEMPLATE_DEBUG = False # True if BaseHandler.get_response() should propagate raw exceptions # rather than catching them. This is useful under some testing siutations, # and should never be used on a live site. DEBUG_PROPAGATE_EXCEPTIONS = False # Whether to use the "Etag" header. This saves bandwidth but slows down performance. USE_ETAGS = False Loading django/core/handlers/base.py +4 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,10 @@ class BaseHandler(object): # Get the exception info now, in case another exception is thrown later. exc_info = sys.exc_info() receivers = dispatcher.send(signal=signals.got_request_exception, request=request) if settings.DEBUG: if settings.DEBUG_PROPAGATE_EXCEPTIONS: raise elif settings.DEBUG: from django.views import debug return debug.technical_500_response(request, *exc_info) else: Loading docs/settings.txt +10 −0 Original line number Diff line number Diff line Loading @@ -391,6 +391,16 @@ are inappropriate for public consumption. File paths, configuration options, and the like all give attackers extra information about your server. Never deploy a site with ``DEBUG`` turned on. DEBUG_PROPAGATE_EXCEPTIONS -------------------- Default: ``False`` If set to True, Django's normal exception handling of view functions will be suppressed, and exceptions will propagate upwards. This can be useful for some test setups, and should never be used on a live site. DEFAULT_CHARSET --------------- Loading Loading
django/conf/global_settings.py +4 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,10 @@ gettext_noop = lambda s: s DEBUG = False TEMPLATE_DEBUG = False # True if BaseHandler.get_response() should propagate raw exceptions # rather than catching them. This is useful under some testing siutations, # and should never be used on a live site. DEBUG_PROPAGATE_EXCEPTIONS = False # Whether to use the "Etag" header. This saves bandwidth but slows down performance. USE_ETAGS = False Loading
django/core/handlers/base.py +4 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,10 @@ class BaseHandler(object): # Get the exception info now, in case another exception is thrown later. exc_info = sys.exc_info() receivers = dispatcher.send(signal=signals.got_request_exception, request=request) if settings.DEBUG: if settings.DEBUG_PROPAGATE_EXCEPTIONS: raise elif settings.DEBUG: from django.views import debug return debug.technical_500_response(request, *exc_info) else: Loading
docs/settings.txt +10 −0 Original line number Diff line number Diff line Loading @@ -391,6 +391,16 @@ are inappropriate for public consumption. File paths, configuration options, and the like all give attackers extra information about your server. Never deploy a site with ``DEBUG`` turned on. DEBUG_PROPAGATE_EXCEPTIONS -------------------- Default: ``False`` If set to True, Django's normal exception handling of view functions will be suppressed, and exceptions will propagate upwards. This can be useful for some test setups, and should never be used on a live site. DEFAULT_CHARSET --------------- Loading