Add bootstrap class to form fields
class BootstrapForm:
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
fields = ['CheckboxInput', 'ClearableFileInput', 'FileInput']
for field in self.fields:
widget_name = self.fields[field].widget.__class__.__name__
if widget_name not in fields:
self.fields[field].widget.attrs.update({
'class': 'form-control'
})