{% load crispy_forms_filters %}
{% load l10n %}

<div class="controls"{% if flat_attrs %} {{ flat_attrs|safe }}{% endif %}>
    {% include 'bootstrap/layout/field_errors_block.html' %}

    {% for choice in field.field.choices %}
        <label for="id_{{ field.html_name }}_{{ forloop.counter }}" class="radio{% if inline_class %} {{ inline_class }}{% endif %}">
            <input type="radio"{% if choice.0|stringformat:"s" == field.value|default_if_none:""|stringformat:"s" %} checked="checked"{% endif %} name="{{ field.html_name }}" id="id_{{ field.html_name }}_{{ forloop.counter }}" value="{{ choice.0|unlocalize }}" {{ field.field.widget.attrs|flatatt }}>{{ choice.1|unlocalize }}
        </label>
    {% endfor %}

    {% include 'bootstrap/layout/help_text.html' %}
</div>
