{{{
>>> import pytz
>>> tzinfo = pytz.timezone('Australia/Melbourne')
>>> Experiment.objects.annotate(
... day=ExtractDay('start_datetime', tzinfo=melb),
... weekday=ExtractWeekDay('start_datetime', tzinfo=melb),
... hour=ExtractHour('start_datetime', tzinfo=melb),
... ).values('day', 'weekday', 'hour').get(
... end_datetime__year=ExtractYear('start_datetime'),
... )
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28568>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* has_patch: 0 => 1
* component: Uncategorized => Documentation
Comment:
pull request: https://github.com/django/django/pull/9022
--
Ticket URL: <https://code.djangoproject.com/ticket/28568#comment:1>
* version: 1.11 => master
--
Ticket URL: <https://code.djangoproject.com/ticket/28568#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"3f2b1d926bb3a72b4c3d2cd958455ebb9b4ca458" 3f2b1d92]:
{{{
#!CommitTicketReference repository=""
revision="3f2b1d926bb3a72b4c3d2cd958455ebb9b4ca458"
Fixed #28568 -- Fixed typo in docs/ref/models/database-functions.txt.
And made an example use naming consistent with the rest of the doc.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28568#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"ddea2166f1db776dadbc26751b8ceaba3cace6b5" ddea2166]:
{{{
#!CommitTicketReference repository=""
revision="ddea2166f1db776dadbc26751b8ceaba3cace6b5"
[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
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28568#comment:4>
Comment (by Tim Graham <timograham@…>):
In [changeset:"db7dfbff53765bb42b51314b4d48d11e42a218db" db7dfbff]:
{{{
#!CommitTicketReference repository=""
revision="db7dfbff53765bb42b51314b4d48d11e42a218db"
[1.10.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
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28568#comment:5>