Needs some layout/CSS work, as it looks like this now:
After a little bit of research, turns out the "form-control" class is making it look that big and misaligned.
Could we tweak this function in forms.py to not affect checkbox fields?
class BootstrapModelFormMixin: """Adds the Bootstrap CSS class 'form-control' to all form fields.""" def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) kwargs.setdefault('label_suffix', '') for field_name, field in self.fields.items(): field.widget.attrs['class'] = 'form-control'
That's the quickest workaround for the time being. Another solution would be to make it (or use a library like CrispyForms?) use the proper Bootstrap syntax.
I'm fairly sure we could.
That's the quickest workaround for the time being.
I don't want a quick workaround. We should have a proper way to do Django forms with Bootstrap. Implement it once, never think about it again, because from that moment on things just work properly.