[Fixed]-Django jinja2 'BoundField' object has no attribute '__call__'

1👍

You don’t call a field, and you don’t add classes to it via the template; you do that in the form definition:

name = fields.CharField(label=_(u'Reči'), required=False, widget=forms.TextInput(attrs={'class': 'form-control'}))

and you just use the attribute in the template:

{{ filter_form.name }}

Note, there is no difference between Jinja and Django templates here.

Leave a comment