1
0
mirror of https://github.com/django/django.git synced 2025-04-01 20:16:43 +00:00

[1.11.x] Fixed #28568 -- Fixed typo in docs/ref/models/database-functions.txt.

And made an example use naming consistent with the rest of the doc.

Backport of 3f2b1d926bb3a72b4c3d2cd958455ebb9b4ca458 from master
This commit is contained in:
Michael 2017-09-04 18:40:56 +00:00 committed by Tim Graham
parent 1db5e687a7
commit ddea2166f1

View File

@ -486,8 +486,8 @@ the Melbourne timezone (UTC +10:00), which changes the day, weekday, and hour
values that are returned::
>>> import pytz
>>> tzinfo = pytz.timezone('Australia/Melbourne') # UTC+10:00
>>> with timezone.override(tzinfo):
>>> melb = pytz.timezone('Australia/Melbourne') # UTC+10:00
>>> with timezone.override(melb):
... Experiment.objects.annotate(
... day=ExtractDay('start_datetime'),
... weekday=ExtractWeekDay('start_datetime'),
@ -501,7 +501,7 @@ Explicitly passing the timezone to the ``Extract`` function behaves in the same
way, and takes priority over an active timezone::
>>> import pytz
>>> tzinfo = pytz.timezone('Australia/Melbourne')
>>> melb = pytz.timezone('Australia/Melbourne')
>>> Experiment.objects.annotate(
... day=ExtractDay('start_datetime', tzinfo=melb),
... weekday=ExtractWeekDay('start_datetime', tzinfo=melb),