#36365: Admin filter_horziontal with formfield_for_manytomany hides existing
records
-------------------------------------+-------------------------------------
     Reporter:  Ramon                |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  4.2
     Severity:  Normal               |               Resolution:
     Keywords:  admin,               |             Triage Stage:
  filter_horizontal                  |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Ramon:

Old 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.

New 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 (example.zip).
 Database: club, member, team.
 member and team belong to one club
 team consists of members
 member can transfer to another club, causing the issue.

 admin.py contains two versions of the team admin model (1 and 2)
 Screenshots for each admin model usage are attached.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019697d38af9-62b2e80c-cc15-4b49-9d46-679cf1bc2a2d-000000%40eu-central-1.amazonses.com.

Reply via email to