Sample case:
{{{
class Project
categories = M2M [having "Cat A", "Cat B", "Cat C", etc.]
subcategories = M2M [having "Sub A1", "Sub A2", "Sub C1", etc.]
}}}
When selecting ''Cat A'' in the **category** it would populate
**subcategory** limited based on which categories are selected)
--
Ticket URL: <https://code.djangoproject.com/ticket/33035>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => Jon Levischi
* status: new => assigned
Old description:
> A combination of the recently implemented "autocomplete_fields" with
> dynamic "limit_choices_to" that actually works on Foreign AND ManyToMany
> fields both on Admin site and Custom Forms.
>
> Sample case:
>
> {{{
> class Project
> categories = M2M [having "Cat A", "Cat B", "Cat C", etc.]
> subcategories = M2M [having "Sub A1", "Sub A2", "Sub C1", etc.]
> }}}
>
> When selecting ''Cat A'' in the **category** it would populate
> **subcategory** limited based on which categories are selected)
New description:
A combination of the recently implemented "autocomplete_fields" with
dynamic "limit_choices_to" that actually works on Foreign AND ManyToMany
fields both on Admin site and Custom Forms.
Sample case:
{{{
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.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/33035#comment:1>
Old description:
> A combination of the recently implemented "autocomplete_fields" with
> dynamic "limit_choices_to" that actually works on Foreign AND ManyToMany
> fields both on Admin site and Custom Forms.
>
> Sample case:
>
> {{{
> 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.
New description:
A combination of the recently implemented "autocomplete_fields" 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!
--
--
Ticket URL: <https://code.djangoproject.com/ticket/33035#comment:2>
Old description:
> A combination of the recently implemented "autocomplete_fields" 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 description:
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!
--
--
Ticket URL: <https://code.djangoproject.com/ticket/33035#comment:3>
* stage: Unreviewed => Accepted
Comment:
Hi Jon — Sounds like a nice feature if it's feasible. I'm not sure it'll
be quite ''Easy Pickings'' but since you've assigned yourself, very happy
to have a look at one you come up with. Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/33035#comment:4>
* owner: Jon Levischi => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/33035#comment:5>
* status: new => closed
* resolution: => needsinfo
Comment:
Jon de-assigned this ticket from themself, so closing as needsinfo, unless
someone provides PoC.
--
Ticket URL: <https://code.djangoproject.com/ticket/33035#comment:6>