﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28568	Example in reference of Database Functions leads to NameError	Michael Käufl	nobody	"The following example (just above https://docs.djangoproject.com/en/1.11/ref/models/database-functions/#trunc) leads to a {{{NameError}}}, because {{{melb}}} is not defined.

{{{
>>> 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'),
... )
}}}
"	Uncategorized	closed	Documentation	dev	Normal	fixed			Unreviewed	1	0	0	0	0	0
