summaryrefslogtreecommitdiff
path: root/docs/howto/error-reporting.txt
diff options
context:
space:
mode:
authordarkryder <sambhav13085@iiitd.ac.in>2015-01-21 22:25:57 +0530
committerTim Graham <timograham@gmail.com>2015-02-03 14:59:45 -0500
commit9ec8aa5e5d42ac4529846f7eae6bf4982800abff (patch)
tree6a1195ff3831031f8207e18e4dcf69015fb4c50c /docs/howto/error-reporting.txt
parent570912a97d5051fa3aeacd9d16c3be9afcf92198 (diff)
Fixed #24149 -- Normalized tuple settings to lists.
Diffstat (limited to 'docs/howto/error-reporting.txt')
-rw-r--r--docs/howto/error-reporting.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/howto/error-reporting.txt b/docs/howto/error-reporting.txt
index 521acf59d3..e71419ba37 100644
--- a/docs/howto/error-reporting.txt
+++ b/docs/howto/error-reporting.txt
@@ -73,14 +73,14 @@ those are usually just people typing in broken URLs or broken Web 'bots).
Put it towards the top of your :setting:`MIDDLEWARE_CLASSES` setting.
You can tell Django to stop reporting particular 404s by tweaking the
-:setting:`IGNORABLE_404_URLS` setting. It should be a tuple of compiled
+:setting:`IGNORABLE_404_URLS` setting. It should be a list of compiled
regular expression objects. For example::
import re
- IGNORABLE_404_URLS = (
+ IGNORABLE_404_URLS = [
re.compile(r'\.(php|cgi)$'),
re.compile(r'^/phpmyadmin/'),
- )
+ ]
In this example, a 404 to any URL ending with ``.php`` or ``.cgi`` will *not* be
reported. Neither will any URL starting with ``/phpmyadmin/``.
@@ -89,11 +89,11 @@ The following example shows how to exclude some conventional URLs that browsers
crawlers often request::
import re
- IGNORABLE_404_URLS = (
+ IGNORABLE_404_URLS = [
re.compile(r'^/apple-touch-icon.*\.png$'),
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.)