context:
- using
django-crispy-formswithcrispy-daisyui - I’m learning about the
|crispyfilter vs the{% crispy %}tag and related topics - I think I now understand the basics of “how” to implement in different ways, but I’m struggling with the “when/why” to choose which options, and I want to see if the general consensus I’m piecing together is on the right track
Summary of learnings / clarifying questions:
- the
|crispyfilter is meant for use with the simplest forms and you don’t customize it at all (it just makes it prettier via whatever the template pack defaults). This generally means that people quickly move to using the `{% crispy %}` tag simply because it allows for more customization. Is that accurate? - the phrase “programmatic layout“ was used in the django-crispy-forms docs and, based on context from other sources, I’m gathering that to have a programmatic layout means that the layout stuff (like the placement fields in a form are displayed) is defined in a .py file instead of the .html template file like would be the normal home of stuff like that. Is that accurate?
- Relatedly, someone implied that there’s two general camps of thought for this topic: one group that doesn’t like defining layout (and maybe also any styling-related stuff like tailwind classes at all, though I’m not sure how far it goes) in anything other than the .html template and one group that, when using django-crispy-forms, likes to have all the form stuff defined in the forms.py using
FormHelper/Layoutso the template just needs the `{% crispy %}` tag. I’m wondering:- are these two camps of similar size or is one of the camps more prevalent/common?
- would someone in the first camp that likes layout stuff in the template still use
django-crispy-formsor is it kind of like the benefits of usingdjango-crispy-formsis diminished enough that if you don’t use the second camp’s philosophy of taking advantage ofFormHelper/Layoutthen it’s kind of not worth it to used?
- Relatedly, someone implied that there’s two general camps of thought for this topic: one group that doesn’t like defining layout (and maybe also any styling-related stuff like tailwind classes at all, though I’m not sure how far it goes) in anything other than the .html template and one group that, when using django-crispy-forms, likes to have all the form stuff defined in the forms.py using
I’m looking for corrections and/or opinions for what’s most typically done and/or how you personally prefer to do things.
Thanks as always, curious to learn more