In other words WidgetMixin assume attrs is either a dict or is not in kwargs, but in the base class Widgets it defaults to None.
Not a big dial, it can be easily worked around, but I think that it should be allowed to blindly pass attrs to all subwidget of a MultiWidget (that's what works with a plain Select at last).
Hello, I found this unexpected behavior when using
ListSelect2
in aMultiWidget
. Basically__init__
breaks if attrs is None.Django
MultiWidget
has the following signatureBut in
dal.widgets.WidgetMixin.__init__
happens thisIn other words
WidgetMixin
assume attrs is either a dict or is not in kwargs, but in the base classWidgets
it defaults to None.Not a big dial, it can be easily worked around, but I think that it should be allowed to blindly pass
attrs
to all subwidget of aMultiWidget
(that's what works with a plain Select at last).Regards