3 ms·
I had a similar workaround in a project, it did something like this: {% form.name|attrs:"class='foo', maxlength=20" %} If Django templates allowed functi
by zeemonkee 16y ago
I had a similar workaround in a project, it did something like this:
{% form.name|attrs:"class='foo', maxlength=20" %}
If Django templates allowed function calls however (as Jinja2 does) that would eliminate the need for a lot of these tags.