﻿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
20849	ModelForms don't work well with prefetch_related	anonymous	nobody	Following the example at [https://docs.djangoproject.com/en/1.5/ref/models/querysets/#prefetch-related], ModelForms are a pain to use if you want to eagerly load many pizza forms. It is more or less worth it to skip writing forms, since figuring out how to write a manual view that can populate 15 pizza forms with 3 queries is easy, whereas writing a form that can do it for fewer than 33 is hard. Manually setting choices on the form can reduce this down to 17, 1 for the list of pizzas, 1 inner join for each pizza, and 1 master list for all toppings, plus 1 superfluous inner join for each pizza. Removing that last bit seems hard and is certainly undocumented.	Cleanup/optimization	closed	Forms	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
