I have a Django form that is part of page. Lets say I have a field:
search_input = forms.CharField(_(u'Search word'), required=False)
I can access it only in template via {{ form.search_input }}. How to set custom HTML attrs (such as name and value)? I would like to find flexible solution, that would allow me to add any needed custom attributes to all types of fields.
But using attrs gives me (if used with CharField):
__init__() got an unexpected keyword argument 'attrs'