{% load i18n %}
{% if show_label %}
{{ field.label }}
{% if field.field.required %}
{% translate "required" %}
{% endif %}
{% endif %}
{% if field_type == "input" %} {% comment %} datetime -> minute precision (Y-m-d\TH:i), not "c": a with no `step` attribute defaults to whole-minute granularity, and a pre-filled value carrying seconds (e.g. NewsPublishForm's `initial=timezone.now`, live to the second) violates that step. Chrome quietly tolerates the mismatch; Safari enforces it and refuses to submit the field at all, with no server-side validation error to explain why -- the fix has to be not sending a value more precise than the field claims to accept. {% endcomment %} {% 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 %}