Permalink
Browse files

Made some small tweaks/fixes to documentation from IGNORABLE_404_URLS…

… changeset [16160]

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 4a4b6b2 commit d7036e52ab856b9e7125391cddcd18c08b5b0938 @adrianholovaty adrianholovaty committed May 24, 2011
Showing with 6 additions and 4 deletions.
  1. +2 −2 django/middleware/common.py
  2. +4 −2 docs/howto/error-reporting.txt
@@ -130,15 +130,15 @@ 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):
return True
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):
@@ -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``.

0 comments on commit d7036e5

Please sign in to comment.