Opened 6 months ago
Last modified 6 months ago
#36365 closed Bug
Admin filter_horziontal with formfield_for_manytomany hides existing records — at Initial Version
| Reported by: | Ramon | Owned by: | |
|---|---|---|---|
| Component: | contrib.admin | Version: | 4.2 |
| Severity: | Normal | Keywords: | admin, filter_horizontal |
| Cc: | Ramon | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Django admin filter_horizontal for manytomany field should show all existing relations in the right-side pane, even when formfield_for_manytomany updates the queryset to not show that relation in the left-side pane. It is misleading to the user to not show the existing relation.
Working example attached.
Database: club, member, team.
member and team belong to one club
team consists of members
member can transfer to another club, causing the issue.
Change History (3)
by , 6 months ago
| Attachment: | example.zip added |
|---|
by , 6 months ago
| Attachment: | screenshot_admin_1.png added |
|---|
by , 6 months ago
| Attachment: | screenshot_admin_2.png added |
|---|
Note:
See TracTickets
for help on using tickets.