{% load i18n %}{% comment %} One field: label, control, help, errors. The control renders itself — the widget already carries the inferred type, constraint and data-vantage-kind attributes from WidgetSpec.html_attrs(), so re-emitting them here would be a second source of truth. Django's BoundField adds aria-invalid and aria-describedby when the field has errors; the ids below are the ones it points at, which is why they must stay "{auto_id}_helptext" and "{auto_id}_error". {% endcomment %} {% if field.readonly %}
{{ field.label }}

{{ field.value }}

{% if field.help_text %}

{{ field.help_text }}

{% endif %}
{% elif field.kind == "boolean" %}
{{ field.bound }} {% if field.bound.help_text %}

{{ field.bound.help_text }}

{% endif %} {% if field.bound.errors %} {% endif %}
{% else %}
{{ field.bound }} {% if field.bound.help_text %}

{{ field.bound.help_text }}

{% endif %} {% if field.bound.errors %} {% endif %}
{% endif %}