diff --git a/django/middleware/common.py b/django/middleware/common.py index 689929bea4..fb55412c9b 100644 --- a/django/middleware/common.py +++ b/django/middleware/common.py @@ -130,7 +130,7 @@ def _is_ignorable_404(uri): if getattr(settings, 'IGNORABLE_404_STARTS', ()): import warnings warnings.warn('The IGNORABLE_404_STARTS setting has been deprecated ' - 'in favour of IGNORABLE_404_URLS.', + 'in favor of IGNORABLE_404_URLS.', PendingDeprecationWarning) for start in settings.IGNORABLE_404_STARTS: if uri.startswith(start): @@ -138,7 +138,7 @@ def _is_ignorable_404(uri): if getattr(settings, 'IGNORABLE_404_ENDS', ()): import warnings warnings.warn('The IGNORABLE_404_ENDS setting has been deprecated ' - 'in favour of IGNORABLE_404_URLS.', + 'in favor of IGNORABLE_404_URLS.', PendingDeprecationWarning) for end in settings.IGNORABLE_404_ENDS: if uri.endswith(end): diff --git a/docs/howto/error-reporting.txt b/docs/howto/error-reporting.txt index 4642c39a92..c15c1d872d 100644 --- a/docs/howto/error-reporting.txt +++ b/docs/howto/error-reporting.txt @@ -84,10 +84,12 @@ crawlers often request:: import re IGNORABLE_404_URLS = ( re.compile(r'^/apple-touch-icon.*\.png$'), - re.compile(r'^/favicon.ico$), - re.compile(r'^/robots.txt$), + re.compile(r'^/favicon\.ico$), + re.compile(r'^/robots\.txt$), ) +(Note that these are regular expressions, so we put a backslash in front of +periods to escape them.) The best way to disable this behavior is to set :setting:`SEND_BROKEN_LINK_EMAILS` to ``False``.