summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2011-01-30 13:20:14 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2011-01-30 13:20:14 +0000
commitafb8c44cdec8ac5106cf7242eeba2af87bccf72f (patch)
treefa13690f626e8ae95d11190ed8c62e2791cdc924
parent7e83c3b91f46458c6b2243b21ac144499bec47cf (diff)
[1.2.X] Fixed #15187 -- Ensure that missing page emails aren't sent when running under debug. Thanks to Dan Carroll for the report and patch.
Backport of r15363 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15365 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/middleware/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/middleware/common.py b/django/middleware/common.py
index 7c748c812a..20619d5d22 100644
--- a/django/middleware/common.py
+++ b/django/middleware/common.py
@@ -82,7 +82,7 @@ class CommonMiddleware(object):
def process_response(self, request, response):
"Send broken link emails and calculate the Etag, if needed."
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,
# send a note to the managers.
domain = request.get_host()