Kaydet (Commit) 4bb1b230 authored tarafından Russell Keith-Magee's avatar Russell Keith-Magee

Fixed #15187 -- Ensure that missing page emails aren't sent when running under…

Fixed #15187 -- Ensure that missing page emails aren't sent when running under debug. Thanks to Dan Carroll for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 56ebab9d
...@@ -92,7 +92,7 @@ class CommonMiddleware(object): ...@@ -92,7 +92,7 @@ class CommonMiddleware(object):
def process_response(self, request, response): def process_response(self, request, response):
"Send broken link emails and calculate the Etag, if needed." "Send broken link emails and calculate the Etag, if needed."
if response.status_code == 404: if response.status_code == 404:
if settings.SEND_BROKEN_LINK_EMAILS: if settings.SEND_BROKEN_LINK_EMAILS and not settings.DEBUG:
# If the referrer was from an internal link or a non-search-engine site, # If the referrer was from an internal link or a non-search-engine site,
# send a note to the managers. # send a note to the managers.
domain = request.get_host() domain = request.get_host()
......
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