Disclaimer: I wrote most of this before getting Steve's reply, so they
may overlap.
--
Again, no doubt that Django can apply classes to form inputs. The
problem is that it happens at Python level, it is not something you can
change by just overriding a template.
The available choices for the project are: provide a bit of CSS that
emulates Bootstrap's styles, or implement custom form-rendering logic.
The former option (which is the one currently in use) is easier to
maintain and easy to swap out for those not using Bootstrap. For the
latter, you've already explained the advantages.
My two cents are that third-party libraries already exist that deeply
integrate Bootstrap into Django / Mezzanine, thus, there's no need to
have this in Mezzanine's core. For example:
http://django-bootstrap3.readthedocs.org/en/latest/templatetags.html.
At this point it seems like it's a matter of preference. For me, the
question is: Should Mezzanine add more overhead to support one specific
CSS framework?
Finally, maybe we can approach the issue differently: Should Mezzanine
enable you to pass custom classes to form inputs? Perhaps this is
something that could be incorporated as a param in the {% fields_for %}
tag. Coincidentally, alternatives already exist, so its inclusion in the
core is debatable:
https://treyhunner.com/2014/09/adding-css-classes-to-django-form-fields/
--
You received this message because you are subscribed to the Google Groups "Mezzanine
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.