Hi
If you are only updating the class attribute you can do a direct assignment
to the class attribute on the dictionary like:
self.fields['attendant_authority'].widget.attrs['class'] =
'select_autoridad'
self.fields["prodotti_var"].widget.attrs["class"] = "form-control
m-bootstrap-select m_sel
Hello everyone,
I am trying to personalize my select fields in a django modelform, however
the changes are not reflected when I try to render the field. Anyone else
ever had this problem?
self.fields["prodotti_var"].widget.attrs.update({"class" :
"form-control
m-bootstrap-select m_sel
2 matches
Mail list logo