I’m outputting fields of a form in a template like this {{ form.first_name }} and I’d like to add a class (eg. blueprint’s span-x-class) to it. So I’d like to know if there’s a nice readymade solution (template filter) for that, which I could use in the fashion {{ form.first_name|add_class:"span-4" }}? (I just want to know if Django’s developers or anybody has thought of that yet without my knowledge before doing it on my own)
I’m outputting fields of a form in a template like this {{ form.first_name }}
Share
To solve this I made my own template filter, you can apply it on any tag, not just input elements!