summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-10-13 11:54:11 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-10-13 11:58:12 +0200
commitddff6522fa72aacc7475ba5cd4bf8683ff12b8c7 (patch)
tree3b9825e5f0382c00df4cd29ae658f1dd4470427d /docs
parent503092b09a9def93f7f5828bbf87cc26147c5b6c (diff)
[1.6.x] Fixed #19560 -- Identified field in warning for naive datetime.
Thanks gcc for the report and vajrasky for the patch. Backport of 570d9c2678d6cc564f9c70138554af8f7ce9ec49 from master.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/i18n/timezones.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/topics/i18n/timezones.txt b/docs/topics/i18n/timezones.txt
index 5ed60d0a94..4652e7e9c1 100644
--- a/docs/topics/i18n/timezones.txt
+++ b/docs/topics/i18n/timezones.txt
@@ -431,14 +431,15 @@ code: :func:`~django.utils.timezone.now`,
Finally, in order to help you locate code that needs upgrading, Django raises
a warning when you attempt to save a naive datetime to the database::
- RuntimeWarning: DateTimeField received a naive datetime (2012-01-01 00:00:00) while time zone support is active.
+ RuntimeWarning: DateTimeField ModelName.field_name received a naive
+ datetime (2012-01-01 00:00:00) while time zone support is active.
During development, you can turn such warnings into exceptions and get a
traceback by adding the following to your settings file::
import warnings
warnings.filterwarnings(
- 'error', r"DateTimeField received a naive datetime",
+ 'error', r"DateTimeField .* received a naive datetime",
RuntimeWarning, r'django\.db\.models\.fields')
Fixtures