<div class="form-group">
    {% include "rest_framework/fields/vertical/label.html" %}
    {% if field.style.inline %}
        <div>
        {% for key, text in field.choices.items %}
            <label class="radio-inline">
                <input type="radio" name="{{ field.field_name }}" value="{{ key }}" {% if key == field.value %}checked{% endif %}>
                {{ text }}
            </label>
        {% endfor %}
        </div>
    {% else %}
        {% for key, text in field.choices.items %}
            <div class="radio">
                <label>
                    <input type="radio" name="{{ field.field_name }}" value="{{ key }}" {% if key == field.value %}checked{% endif %}>
                    {{ text }}
                </label>
            </div>
        {% endfor %}
    {% endif %}
</div>
