﻿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
18361	Accessing a ModelChoiceField property in a template triggers QuerySet  evaluation	Kevin Michel	nobody	"When reading a property of a ModelChoiceField in a template :
`{{ form.something.label }}`
The template languages first tries to evaluate `form.something['label']`.

Since ModelChoiceFields are iterable, the `__getitem__` implementation
calls `__iter__`, which, if the field is bound to a `QuerySet`, force its evaluation.

A simple type check before building the list in `__getitem__` can avoid this inefficiency.

"	Cleanup/optimization	closed	Forms	1.4	Normal	wontfix			Design decision needed	1	0	0	0	0	0
