This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on post from: | |
# https://snipt.net/chrisdpratt/symmetrical-manytomany-filter-horizontal-in-django-admin/#L-26 | |
""" | |
When adding a many-to-many (m2m) relationship in Django, you can use a nice | |
filter-style multiple select widget to manage entries. However, Django only | |
lets you edit the m2m relationship this way on the forward model. The only | |
built-in method in Django to edit the reverse relationship in the admin is | |
through an InlineModelAdmin. |