CommonMiddleware should only send broken link emails if DEBUG is False
|Reported by:||Dan Carroll||Owned by:||Dan Carroll|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
According to the documentation on error reporting (see here: http://docs.djangoproject.com/en/dev/howto/error-reporting/), broken link emails are only sent if the following conditions are true (and CommonMiddleware is enabled):
- DEBUG is False
- SEND_BROKEN_LINK_EMAILS is True
Right now, CommonMiddleware.py only checks the second condition:
if settings.SEND_BROKEN_LINK_EMAILS: ...
In this case, I believe the best fix is to keep Django in line with the documentation, since broken link emails are unnecessary in an environment where DEBUG = True. Here is a quick look at the fix:
if settings.SEND_BROKEN_LINK_EMAILS and not settings.DEBUG: ...
Change History (7)
comment:2 Changed 6 years ago by
|Component:||Uncategorized → Core framework|
|Keywords:||common middleware added|