From 2ea3fb3e6386c43f124b542e92b817dbc227c76b Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 5 Jan 2020 10:04:51 +0000 Subject: Removed "Don't do that" from docs and error messages. It's slightly aggressive and doesn't explain itself. --- docs/intro/tutorial03.txt | 7 ------- docs/topics/db/managers.txt | 5 ++--- docs/topics/i18n/timezones.txt | 11 ++++++----- 3 files changed, 8 insertions(+), 15 deletions(-) (limited to 'docs') diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt index 23282c4f6d..73cc778106 100644 --- a/docs/intro/tutorial03.txt +++ b/docs/intro/tutorial03.txt @@ -125,13 +125,6 @@ view function. The ``:question_id>`` part of the string defines the name that will be used to identify the matched pattern, and the ``>> import datetime - >>> def one_year_before(value): # DON'T DO THAT! + >>> def one_year_before(value): # Wrong example. ... return value.replace(year=value.year - 1) >>> one_year_before(datetime.datetime(2012, 3, 1, 10, 0)) datetime.datetime(2011, 3, 1, 10, 0) @@ -507,9 +508,9 @@ Setup ... ValueError: day is out of range for month - (To implement this function, you must decide whether 2012-02-29 minus - one year is 2011-02-28 or 2011-03-01, which depends on your business - requirements.) + To implement such a function correctly, you must decide whether 2012-02-29 + minus one year is 2011-02-28 or 2011-03-01, which depends on your business + requirements. #. **How do I interact with a database that stores datetimes in local time?** -- cgit v1.3