{% spaceless %} {% for group, options, index in widget.optgroups %} {% for option in options %} {% include "django/forms/widgets/input.html" with widget=option %} {{ option.label }} {% endfor %} {% endfor %} {% endspaceless %}