1
0
mirror of https://github.com/django/django.git synced 2025-10-25 22:56:12 +00:00

Merged recent trunk changes.

This commit is contained in:
Russell Keith-Magee
2012-09-26 07:09:23 +08:00
18 changed files with 144 additions and 111 deletions

View File

@@ -286,7 +286,7 @@ cache is multi-process and thread-safe. To use it, set
The cache :setting:`LOCATION <CACHES-LOCATION>` is used to identify individual
memory stores. If you only have one locmem cache, you can omit the
:setting:`LOCATION <CACHES-LOCATION>`; however, if you have more that one local
:setting:`LOCATION <CACHES-LOCATION>`; however, if you have more than one local
memory cache, you will need to assign a name to at least one of them in
order to keep them separate.

View File

@@ -345,36 +345,6 @@ This logging configuration does the following things:
printed to the console; ``ERROR`` and ``CRITICAL``
messages will also be output via email.
.. admonition:: Custom handlers and circular imports
If your ``settings.py`` specifies a custom handler class and the file
defining that class also imports ``settings.py`` a circular import will
occur.
For example, if ``settings.py`` contains the following config for
:setting:`LOGGING`::
LOGGING = {
'version': 1,
'handlers': {
'custom_handler': {
'level': 'INFO',
'class': 'myproject.logconfig.MyHandler',
}
}
}
and ``myproject/logconfig.py`` has the following line before the
``MyHandler`` definition::
from django.conf import settings
then the ``dictconfig`` module will raise an exception like the following::
ValueError: Unable to configure handler 'custom_handler':
Unable to configure handler 'custom_handler':
'module' object has no attribute 'logconfig'
.. _formatter documentation: http://docs.python.org/library/logging.html#formatter-objects
Custom logging configuration