Re: Select "class" attributes are not updated

2018-08-08 Thread Luis Polanco
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

Select "class" attributes are not updated

2018-08-08 Thread matteo gassend
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