I have a model form that is made up largely of django-autocomplete-light
ModelSelect2
boxes:
class AlertForm(ModelForm):
class Meta:
model = Alert
fields = '__all__'
widgets = {
'entity': ModelSelect2(url='eda', attrs={'data-minimum-input-length': 2}),
'logic': ModelSelect2(url='logic', attrs{'class':'hello'})
}
The CSS class hello
which I am attempting to add to the logic
select box does not appear when the page is rendered. How do I add a CSS class to a dal
select box?
Edit: Even if this did add a class to the select box, the class actually needs to be added to the select container. How would this be accomplished?