Given:
{% widget "form_alias:TextInput" id="lol" raw_value="lol2" %}
An exception is raised:
AttributeError: 'str' object has no attribute 'items'
because {{ widget.attrs|flatattrs }} receives '' (or TEMPLATE_STRING_IF_INVALID maybe? dunno) due to not having a Widget instance in the context.
Probably the fix is to wrap the widget attrs output in an IfNode?
Given:
{% widget "form_alias:TextInput" id="lol" raw_value="lol2" %}An exception is raised:
AttributeError: 'str' object has no attribute 'items'because
{{ widget.attrs|flatattrs }}receives''(or TEMPLATE_STRING_IF_INVALID maybe? dunno) due to not having aWidgetinstance in the context.Probably the fix is to wrap the widget attrs output in an IfNode?