I’m relatively new to Django. I’m searching and can’t find a complete example of a Many-to-Many relationship (like the Pizza-Topping example). I’ve tried, but can’t find enough documentation for rendering the MultipleChoiceField field and including the option to add and remove items. I’d appreciate a complete example. Thanks!
Welcome @maurojp !
A ManyToManyField
is typically rendered in a form as a ModelMultipleChoiceField
using the SelectMultiple
widget.
When used that way, it “just works” like any other field.
If you’re having problems getting this to work, it would be helpful if you posted the actual code you are trying to use, along with a more complete description of where you’re having problems.