[Django] #34345: filter_horizontal and filter_vertical don't work with through - limitation not documented

5 views
Skip to first unread message

Django

unread,
Feb 16, 2023, 4:53:14 PM2/16/23
to django-...@googlegroups.com
#34345: filter_horizontal and filter_vertical don't work with through - limitation
not documented
-----------------------------------------+------------------------
Reporter: David Pratten | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 4.1
Severity: Normal | Keywords: Gotcha
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-----------------------------------------+------------------------
Hi team,

I'm a huge fan of Django and have been using it since 0.95 but I stumbled
over this one.

Neither of

-
https://docs.djangoproject.com/en/4.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.filter_horizontal
and
-
https://docs.djangoproject.com/en/4.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.filter_vertical

call out the requirement to **not** use
{{{
ManyToManyField(through="")
}}}

In the same way:
-
https://docs.djangoproject.com/en/4.1/ref/models/fields/#django.db.models.ManyToManyField.through

doesn't call out the consequence that filter_horizontal and
filter_vertical will stop working if one goes down the pathway of:

{{{
ManyToManyField(through="")
}}}


I just wasted half a day chasing this down.

--
Ticket URL: <https://code.djangoproject.com/ticket/34345>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Reply all
Reply to author
Forward
0 new messages