Admin filter_horziontal with formfield_for_manytomany hides existing records
— at Version 2
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.
In screenshot 2 the record Member (5) is not shown in the right-side pane, while it is present in the database.