{% load i18n %}
{% if show_label %}
{{ field.label }}
{% if field.field.required %}
{% translate "required" %}
{% endif %}
{% endif %}
{% if field_type == "input" %} {% elif field_type == "checkbox" %}
{% if show_help_text %}
{{ field.help_text }}
{% endif %}
{% elif field_type == "textarea" %} {% elif field_type == "select" %} {% comment %} field.field.widget.choices, not field.field.choices: a plain ChoiceField exposes both (kept in sync), but NullBooleanField (the "everyone" tri-state Yes/No/Unknown field) only ever has them on the widget -- the field itself has no .choices attribute at all. Reading from the field silently rendered zero
{% if field_type != "checkbox" and field.help_text and show_help_text or field.errors %}
{% if field.errors %}
{{ field.errors }}
{% endif %} {% if field.help_text %}
{{ field.help_text }}
{% endif %}
{% endif %}
{% comment %}
{% endcomment %}