django-bootstrap-form icon indicating copy to clipboard operation
django-bootstrap-form copied to clipboard

'SafeText' object has no attribute 'visible_fields'

Open benedictchen opened this issue 7 years ago • 2 comments

return render(element, markup_classes)

File "XXXXXXX/lib/python2.7/site-packages/bootstrapform/templatetags/bootstrap.py", line 74, in render for field in element.visible_fields(): AttributeError: 'SafeText' object has no attribute 'visible_fields'

benedictchen avatar Jul 27 '16 15:07 benedictchen

this generally means that the form field does not exist or is broken and django's template engine translates this into an empty string. assuming that you are trying something like {{form.brokenfield|bootstrap}}. Does {{form.brokenfield}} work?

Juanka7557 avatar Feb 05 '17 23:02 Juanka7557

Same error but with: 'str' object has no attribute 'visible_fields'

zelds avatar Sep 07 '18 14:09 zelds