How to add HTML attributes to the form.field from a template?
I'm either bad looking or something else. How to add HTML attributes in the template itself, not from the form class?
In Jinja2 it looks like this:
But how is this done in Django without third-party modules? Or maybe at least have the opportunity to get out all of the field data - type, etc., necessary for the layout?
asked July 4th 19 at 23:36
Native does. Without third-party modules two options:
1) the form Class. I think that it's awful.
2) Self inclusion_tag
But it is more convenient to use django-widget-tweaks.
Find more questions by tags DjangoPython