﻿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
33035	Autocomplete and populating Subcategories based on selected Categories (Admin and Forms)	Jon Levischi		"A combination of the recently implemented ""autocomplete_fields"" (awesome btw!) with dynamic ""limit_choices_to"" that actually works on Foreign AND ManyToMany fields both on Admin site and Custom Forms.

{{{
class Project
    categories = M2M [having ""Cat A"", ""Cat B"", ""Cat C"", ""Cat D"", etc.]
    subcategories = M2M [having ""Sub A1"", ""Sub A2"", ""Sub B1"", ""Sub B2"", ""Sub C1"", ""Sub C2"", etc.]
}}}

When selecting ''Cat A'' in the **category** it would populate **subcategory** limiting options to ""Sub A1"", ""Sub A2"", ""Sub C1"", ""Sub C2"", based on their parents, but not ""Cat B"" nor ""Cat D"" children).

I know this is possible using Ajax, django-autocomplete-light or similar, but it's so frequently used that I think it makes sense to be included in Django itself.

Thank you!"	New feature	closed	Forms	3.2	Normal	needsinfo	autocomplete_fields, limit_choices_to		Accepted	0	0	0	0	1	1
