{% load static %}

<div class="aldryn-bootstrap3 aldryn-bootstrap3-context" data-context="{{ selects.name }}">
    <div class="btn-group js-btn-group-context-{{ selects.name }}" data-toggle="buttons">
        {% if widget %}
            {# Django 1.11+ #}
            {% for group, options, index in widget.optgroups %}
              {% for option in options %}
                {% include option.template_name with widget=option %}{% endfor %}
            {% endfor %}
        {% elif selects %}
            {# Django < 1.11 #}
            {% for item in selects %}
                {{ item }}
            {% endfor %}
        {% endif %}
    </div>
</div>
