Commit c23425b7 by Piotr Mitros

Merge

parents 974f7442 6fa632c0
import logging import logging
from django.conf import settings
from django.http import HttpResponse from django.http import HttpResponse
log = logging.getLogger("mitx") log = logging.getLogger("mitx")
...@@ -8,6 +9,7 @@ class ExceptionLoggingMiddleware(object): ...@@ -8,6 +9,7 @@ class ExceptionLoggingMiddleware(object):
"""Just here to log unchecked exceptions that go all the way up the Django """Just here to log unchecked exceptions that go all the way up the Django
stack""" stack"""
if not settings.TEMPLATE_DEBUG:
def process_exception(self, request, exception): def process_exception(self, request, exception):
log.exception(exception) log.exception(exception)
return HttpResponse("Server Error - Please try again later.") return HttpResponse("Server Error - Please try again later.")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment