25👍
✅
If you define the field in the form you need to include the widget:
from django.contrib.admin.widgets import FilteredSelectMultiple
blocked_email_notifications = ModelMultipleChoiceField(
queryset=EmailTemplate.objects.order_by('key'),
required=False,
widget=FilteredSelectMultiple(
verbose_name=EmailTemplate._meta.verbose_name,
is_stacked=False))
is_stacked
:
False
: the lists are rendered side by sideTrue
: the lists are rendered one underneath the other
Source:stackexchange.com