diff --git a/rest_framework/templates/rest_framework/horizontal/radio.html b/rest_framework/templates/rest_framework/horizontal/radio.html index 52238bb1aa..cabd09d2b9 100644 --- a/rest_framework/templates/rest_framework/horizontal/radio.html +++ b/rest_framework/templates/rest_framework/horizontal/radio.html @@ -1,20 +1,37 @@ +{% load i18n %} +{% trans "None" as none_choice %} +
{% if field.label %} {% endif %}
{% if style.inline %} + {% if field.allow_null or field.allow_blank %} + + {% endif %} {% for key, text in field.choices.items %} {% endfor %} {% else %} + {% if field.allow_null or field.allow_blank %} +
+ +
+ {% endif %} {% for key, text in field.choices.items %}
diff --git a/rest_framework/templates/rest_framework/inline/radio.html b/rest_framework/templates/rest_framework/inline/radio.html index 1915f4f846..b650167155 100644 --- a/rest_framework/templates/rest_framework/inline/radio.html +++ b/rest_framework/templates/rest_framework/inline/radio.html @@ -1,7 +1,18 @@ +{% load i18n %} +{% trans "None" as none_choice %} +
{% if field.label %} {% endif %} + {% if field.allow_null or field.allow_blank %} +
+ +
+ {% endif %} {% for key, text in field.choices.items %}