{% load form_helpers %} {% load helpers %} {% load i18n %}
{# Render the field label (if any), except for checkboxes #} {% if label and not field|widget_type == 'checkboxinput' %}
{% endif %} {# Render the field itself #}
{# Include the "regenerate" button on slug fields #} {% if field|widget_type == 'slugwidget' %}
{% render_field_with_aria field %}
{# Render checkbox labels to the right of the field #} {% elif field|widget_type == 'checkboxinput' %}
{% render_field_with_aria field %} {% if field.help_text %} {{ field.help_text|safe }} {% endif %}
{# Include a copy-to-clipboard button #} {% elif 'data-clipboard' in field.field.widget.attrs %}
{% render_field_with_aria field %}
{# Default field rendering #} {% else %} {% render_field_with_aria field %} {% endif %} {# Display any error messages #} {% if field.errors %} {% endif %} {# Help text #} {% if field.help_text and field|widget_type != 'checkboxinput' %} {{ field.help_text|safe }} {% endif %} {# For bulk edit forms, include an option to nullify the field #} {% if bulk_nullable %}
{% endif %}