{% load i18n %} {% with id=widget.attrs.id %}
{% for group, options, index in widget.optgroups %} {% if group %} {{ group }}
{% endif %} {% for option in options %}
{% include option.template_name with widget=option %}
{% endfor %} {% if group %}
{% endif %} {% endfor %} {% if widget.optgroups and toggle_all_button %}
{% endif %}
{% endwith %}