Improved error e-mail docs in docs/settings.txt from [4619]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
36a514f818
commit
7b2c6984cd
|
@ -197,9 +197,8 @@ of (Full name, e-mail address). Example::
|
|||
|
||||
(('John', 'john@example.com'), ('Mary', 'mary@example.com'))
|
||||
|
||||
Note that Django will email all of these people when there's an error, see the
|
||||
section on `error-reporting via email`_ for more information.
|
||||
|
||||
Note that Django will e-mail *all* of these people whenever an error happens. See the
|
||||
section on `error reporting via e-mail`_ for more information.
|
||||
|
||||
ALLOWED_INCLUDE_ROOTS
|
||||
---------------------
|
||||
|
@ -428,7 +427,7 @@ IGNORABLE_404_ENDS
|
|||
|
||||
Default: ``('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')``
|
||||
|
||||
See also ``IGNORABLE_404_STARTS`` and ``Django Error-reporting via Email``
|
||||
See also ``IGNORABLE_404_STARTS`` and ``Error reporting via e-mail``.
|
||||
|
||||
IGNORABLE_404_STARTS
|
||||
--------------------
|
||||
|
@ -437,7 +436,7 @@ Default: ``('/cgi-bin/', '/_vti_bin', '/_vti_inf')``
|
|||
|
||||
A tuple of strings that specify beginnings of URLs that should be ignored by
|
||||
the 404 e-mailer. See ``SEND_BROKEN_LINK_EMAILS``, ``IGNORABLE_404_ENDS`` and
|
||||
the section on `error-reporting via email`_.
|
||||
the section on `error reporting via e-mail`_.
|
||||
|
||||
INSTALLED_APPS
|
||||
--------------
|
||||
|
@ -652,7 +651,7 @@ Whether to send an e-mail to the ``MANAGERS`` each time somebody visits a
|
|||
Django-powered page that is 404ed with a non-empty referer (i.e., a broken
|
||||
link). This is only used if ``CommonMiddleware`` is installed (see the
|
||||
`middleware docs`_). See also ``IGNORABLE_404_STARTS``,
|
||||
``IGNORABLE_404_ENDS`` and the section on `error-reporting via email`_
|
||||
``IGNORABLE_404_ENDS`` and the section on `error reporting via e-mail`_
|
||||
|
||||
SERVER_EMAIL
|
||||
------------
|
||||
|
@ -993,23 +992,35 @@ Also, it's an error to call ``configure()`` more than once, or to call
|
|||
It boils down to this: Use exactly one of either ``configure()`` or
|
||||
``DJANGO_SETTINGS_MODULE``. Not both, and not neither.
|
||||
|
||||
Error-reporting via email
|
||||
=========================
|
||||
Error reporting via e-mail
|
||||
==========================
|
||||
|
||||
When ``DEBUG`` mode is turned off, Django will email the users listed in the
|
||||
``ADMIN`` setting whenever a server error occurs. This is most commonly when a
|
||||
resource is not found (404 errors), or when there's been an internal server
|
||||
error (500). This gives the administrators immediate notification of any errors.
|
||||
Server errors
|
||||
-------------
|
||||
|
||||
You can tell Django to stop reporting these 404's by adding the page to the
|
||||
``IGNORABLE_404_ENDS`` setting:
|
||||
When ``DEBUG`` is ``False``, Django will e-mail the users listed in the
|
||||
``ADMIN`` setting whenever your code raises an unhandled exception and results
|
||||
in an internal server error (HTTP status code 500). This gives the
|
||||
administrators immediate notification of any errors.
|
||||
|
||||
IGNORABLE_404_ENDS = ('xmlhttp.php')
|
||||
To disable this behavior, just remove all entries from the ``ADMINS`` setting.
|
||||
|
||||
Or, you can ignore it using the start of the request path, by using the
|
||||
``IGNORABLE_404_STARTS`` setting:
|
||||
404 errors
|
||||
----------
|
||||
|
||||
When ``DEBUG`` is ``False`` and your ``MIDDLEWARE_CLASSES`` setting includes
|
||||
``CommonMiddleware``, Django will e-mail the users listed in the ``MANAGERS``
|
||||
setting whenever your code raises a 404 and the request has a referer.
|
||||
(It doesn't bother to e-mail for 404s that don't have a referer.)
|
||||
|
||||
You can tell Django to stop reporting particular 404s by tweaking the
|
||||
``IGNORABLE_404_ENDS`` and ``IGNORABLE_404_STARTS`` settings. Both should be a
|
||||
tuple of strings. For example::
|
||||
|
||||
IGNORABLE_404_ENDS = ('.php', '.cgi')
|
||||
IGNORABLE_404_STARTS = ('/phpmyadmin/')
|
||||
|
||||
Finally, if you wish to turn off this email reporting completely, just remove
|
||||
all entries from the ``ADMINS`` setting.
|
||||
In this example, a 404 to any URL ending with ``.php`` or ``.cgi`` will *not*
|
||||
be reported. Neither will any URL starting with ``/phpmyadmin/``.
|
||||
|
||||
To disable this behavior, just remove all entries from the ``MANAGERS`` setting.
|
||||
|
|
Loading…
Reference in New Issue