-
-
-
+ {% csrf_token %}
+ {% for field in form %}
+ {% if not field.read_only %}
+ {% render_field field style=style %}
+ {% endif %}
+ {% endfor %}
+
+
diff --git a/rest_framework/templates/rest_framework/horizontal/input.html b/rest_framework/templates/rest_framework/horizontal/input.html
index c41cd523a..82e6dc67c 100644
--- a/rest_framework/templates/rest_framework/horizontal/input.html
+++ b/rest_framework/templates/rest_framework/horizontal/input.html
@@ -1,14 +1,21 @@
diff --git a/rest_framework/templates/rest_framework/horizontal/list_fieldset.html b/rest_framework/templates/rest_framework/horizontal/list_fieldset.html
index a9ff04a62..962c333c0 100644
--- a/rest_framework/templates/rest_framework/horizontal/list_fieldset.html
+++ b/rest_framework/templates/rest_framework/horizontal/list_fieldset.html
@@ -1,16 +1,13 @@
{% load rest_framework %}
+
diff --git a/rest_framework/templates/rest_framework/horizontal/radio.html b/rest_framework/templates/rest_framework/horizontal/radio.html
index cabd09d2b..0b4948542 100644
--- a/rest_framework/templates/rest_framework/horizontal/radio.html
+++ b/rest_framework/templates/rest_framework/horizontal/radio.html
@@ -2,46 +2,54 @@
{% trans "None" as none_choice %}
diff --git a/rest_framework/templates/rest_framework/horizontal/select.html b/rest_framework/templates/rest_framework/horizontal/select.html
index 8a7fca370..8957eef9f 100644
--- a/rest_framework/templates/rest_framework/horizontal/select.html
+++ b/rest_framework/templates/rest_framework/horizontal/select.html
@@ -1,21 +1,28 @@
diff --git a/rest_framework/templates/rest_framework/horizontal/select_multiple.html b/rest_framework/templates/rest_framework/horizontal/select_multiple.html
index 0735f2809..407b356ff 100644
--- a/rest_framework/templates/rest_framework/horizontal/select_multiple.html
+++ b/rest_framework/templates/rest_framework/horizontal/select_multiple.html
@@ -2,22 +2,29 @@
{% trans "No items to select." as no_items %}
diff --git a/rest_framework/templates/rest_framework/horizontal/textarea.html b/rest_framework/templates/rest_framework/horizontal/textarea.html
index ec1075495..ab083807b 100644
--- a/rest_framework/templates/rest_framework/horizontal/textarea.html
+++ b/rest_framework/templates/rest_framework/horizontal/textarea.html
@@ -1,14 +1,21 @@
diff --git a/rest_framework/templates/rest_framework/inline/checkbox.html b/rest_framework/templates/rest_framework/inline/checkbox.html
index 71737f15f..665249a52 100644
--- a/rest_framework/templates/rest_framework/inline/checkbox.html
+++ b/rest_framework/templates/rest_framework/inline/checkbox.html
@@ -1,8 +1,8 @@
diff --git a/rest_framework/templates/rest_framework/inline/checkbox_multiple.html b/rest_framework/templates/rest_framework/inline/checkbox_multiple.html
index 093496862..b02425a62 100644
--- a/rest_framework/templates/rest_framework/inline/checkbox_multiple.html
+++ b/rest_framework/templates/rest_framework/inline/checkbox_multiple.html
@@ -1,13 +1,14 @@
diff --git a/rest_framework/templates/rest_framework/inline/fieldset.html b/rest_framework/templates/rest_framework/inline/fieldset.html
index e49b42fdf..44feef889 100644
--- a/rest_framework/templates/rest_framework/inline/fieldset.html
+++ b/rest_framework/templates/rest_framework/inline/fieldset.html
@@ -1,6 +1,6 @@
{% load rest_framework %}
{% for nested_field in field %}
- {% if not nested_field.read_only %}
- {% render_field nested_field style=style %}
- {% endif %}
+ {% if not nested_field.read_only %}
+ {% render_field nested_field style=style %}
+ {% endif %}
{% endfor %}
diff --git a/rest_framework/templates/rest_framework/inline/form.html b/rest_framework/templates/rest_framework/inline/form.html
index 6a0ea81d3..e56e4312b 100644
--- a/rest_framework/templates/rest_framework/inline/form.html
+++ b/rest_framework/templates/rest_framework/inline/form.html
@@ -1,11 +1,13 @@
{% load rest_framework %}
+
diff --git a/rest_framework/templates/rest_framework/inline/input.html b/rest_framework/templates/rest_framework/inline/input.html
index de85ba485..f28e8f11c 100644
--- a/rest_framework/templates/rest_framework/inline/input.html
+++ b/rest_framework/templates/rest_framework/inline/input.html
@@ -1,6 +1,9 @@
- {% if field.label %}
-
- {% endif %}
-
+ {% if field.label %}
+
+ {% endif %}
+
+
diff --git a/rest_framework/templates/rest_framework/inline/radio.html b/rest_framework/templates/rest_framework/inline/radio.html
index b65016715..efaef6c9b 100644
--- a/rest_framework/templates/rest_framework/inline/radio.html
+++ b/rest_framework/templates/rest_framework/inline/radio.html
@@ -2,23 +2,27 @@
{% trans "None" as none_choice %}
diff --git a/rest_framework/templates/rest_framework/inline/select.html b/rest_framework/templates/rest_framework/inline/select.html
index 6b30e4d6b..c3b2923a1 100644
--- a/rest_framework/templates/rest_framework/inline/select.html
+++ b/rest_framework/templates/rest_framework/inline/select.html
@@ -1,13 +1,17 @@
- {% if field.label %}
-
+ {% if field.label %}
+
+ {% endif %}
+
+
diff --git a/rest_framework/templates/rest_framework/inline/select_multiple.html b/rest_framework/templates/rest_framework/inline/select_multiple.html
index 5a8b2494b..b9b8bb4ea 100644
--- a/rest_framework/templates/rest_framework/inline/select_multiple.html
+++ b/rest_framework/templates/rest_framework/inline/select_multiple.html
@@ -2,14 +2,17 @@
{% trans "No items to select." as no_items %}
- {% if field.label %}
-
- {% endif %}
-
- {% for key, text in field.choices.items %}
-
- {% empty %}
-
- {% endfor %}
-
+ {% if field.label %}
+
+ {% endif %}
+
+
+ {% for key, text in field.choices.items %}
+
+ {% empty %}
+
+ {% endfor %}
+
diff --git a/rest_framework/templates/rest_framework/inline/textarea.html b/rest_framework/templates/rest_framework/inline/textarea.html
index 0766a01c5..bce427faa 100644
--- a/rest_framework/templates/rest_framework/inline/textarea.html
+++ b/rest_framework/templates/rest_framework/inline/textarea.html
@@ -1,6 +1,9 @@
- {% if field.label %}
-
- {% endif %}
-
+ {% if field.label %}
+
+ {% endif %}
+
+
diff --git a/rest_framework/templates/rest_framework/login_base.html b/rest_framework/templates/rest_framework/login_base.html
index 8e6240a68..9ac80308b 100644
--- a/rest_framework/templates/rest_framework/login_base.html
+++ b/rest_framework/templates/rest_framework/login_base.html
@@ -3,66 +3,65 @@
{% load staticfiles %}
{% load rest_framework %}
- {% block body %}
-
+{% block body %}
+
+
+
+
+
+
+ {% block branding %}
Django REST framework
{% endblock %}
+
+
-
-
-
-
-
- {% block branding %}
Django REST framework
{% endblock %}
-
-
-
-
-
-
-
-
- {% endblock %}
+
+
+
+
+
+{% endblock %}
diff --git a/rest_framework/templates/rest_framework/pagination/numbers.html b/rest_framework/templates/rest_framework/pagination/numbers.html
index 040458104..4ff9385f6 100644
--- a/rest_framework/templates/rest_framework/pagination/numbers.html
+++ b/rest_framework/templates/rest_framework/pagination/numbers.html
@@ -1,27 +1,47 @@
diff --git a/rest_framework/templates/rest_framework/pagination/previous_and_next.html b/rest_framework/templates/rest_framework/pagination/previous_and_next.html
index 08c177098..5563c4b67 100644
--- a/rest_framework/templates/rest_framework/pagination/previous_and_next.html
+++ b/rest_framework/templates/rest_framework/pagination/previous_and_next.html
@@ -1,12 +1,21 @@
diff --git a/rest_framework/templates/rest_framework/raw_data_form.html b/rest_framework/templates/rest_framework/raw_data_form.html
index b4c9f1a11..2aa0beecd 100644
--- a/rest_framework/templates/rest_framework/raw_data_form.html
+++ b/rest_framework/templates/rest_framework/raw_data_form.html
@@ -2,11 +2,11 @@
{% csrf_token %}
{{ form.non_field_errors }}
{% for field in form %}
-
diff --git a/rest_framework/templates/rest_framework/vertical/checkbox_multiple.html b/rest_framework/templates/rest_framework/vertical/checkbox_multiple.html
index 134cca661..a3a3a08ae 100644
--- a/rest_framework/templates/rest_framework/vertical/checkbox_multiple.html
+++ b/rest_framework/templates/rest_framework/vertical/checkbox_multiple.html
@@ -1,30 +1,35 @@
diff --git a/rest_framework/templates/rest_framework/vertical/fieldset.html b/rest_framework/templates/rest_framework/vertical/fieldset.html
index 3eb5191c7..4ec2a5d48 100644
--- a/rest_framework/templates/rest_framework/vertical/fieldset.html
+++ b/rest_framework/templates/rest_framework/vertical/fieldset.html
@@ -1,9 +1,15 @@
{% load rest_framework %}
+
diff --git a/rest_framework/templates/rest_framework/vertical/form.html b/rest_framework/templates/rest_framework/vertical/form.html
index e68835c0e..bd57ca19a 100644
--- a/rest_framework/templates/rest_framework/vertical/form.html
+++ b/rest_framework/templates/rest_framework/vertical/form.html
@@ -1,11 +1,12 @@
{% load rest_framework %}
+
diff --git a/rest_framework/templates/rest_framework/vertical/input.html b/rest_framework/templates/rest_framework/vertical/input.html
index 43cccd3ea..71e132fe9 100644
--- a/rest_framework/templates/rest_framework/vertical/input.html
+++ b/rest_framework/templates/rest_framework/vertical/input.html
@@ -1,12 +1,17 @@
-
- {% if field.label %}
-
- {% endif %}
-
- {% if field.errors %}
- {% for error in field.errors %}
{{ error }}{% endfor %}
- {% endif %}
- {% if field.help_text %}
-
{{ field.help_text }}
- {% endif %}
+
+ {% if field.label %}
+
+ {% endif %}
+
+
+
+ {% if field.errors %}
+ {% for error in field.errors %}
+ {{ error }}
+ {% endfor %}
+ {% endif %}
+
+ {% if field.help_text %}
+ {{ field.help_text }}
+ {% endif %}
diff --git a/rest_framework/templates/rest_framework/vertical/list_fieldset.html b/rest_framework/templates/rest_framework/vertical/list_fieldset.html
index 82d7b5f41..f2b615fe1 100644
--- a/rest_framework/templates/rest_framework/vertical/list_fieldset.html
+++ b/rest_framework/templates/rest_framework/vertical/list_fieldset.html
@@ -1,4 +1,9 @@
diff --git a/rest_framework/templates/rest_framework/vertical/radio.html b/rest_framework/templates/rest_framework/vertical/radio.html
index dea03e54e..bfee4e92d 100644
--- a/rest_framework/templates/rest_framework/vertical/radio.html
+++ b/rest_framework/templates/rest_framework/vertical/radio.html
@@ -2,46 +2,55 @@
{% trans "None" as none_choice %}
diff --git a/rest_framework/templates/rest_framework/vertical/select.html b/rest_framework/templates/rest_framework/vertical/select.html
index 1d1109f6e..dc32d39dd 100644
--- a/rest_framework/templates/rest_framework/vertical/select.html
+++ b/rest_framework/templates/rest_framework/vertical/select.html
@@ -1,19 +1,27 @@
- {% if field.label %}
-
- {% endif %}
-
- {% if field.allow_null or field.allow_blank %}
-
- {% endif %}
- {% for key, text in field.choices.items %}
-
- {% endfor %}
-
- {% if field.errors %}
- {% for error in field.errors %}{{ error }}{% endfor %}
- {% endif %}
- {% if field.help_text %}
- {{ field.help_text }}
+ {% if field.label %}
+
+ {% endif %}
+
+
+ {% if field.allow_null or field.allow_blank %}
+
{% endif %}
+
+ {% for key, text in field.choices.items %}
+
+ {% endfor %}
+
+
+ {% if field.errors %}
+ {% for error in field.errors %}
+ {{ error }}
+ {% endfor %}
+ {% endif %}
+
+ {% if field.help_text %}
+ {{ field.help_text }}
+ {% endif %}
diff --git a/rest_framework/templates/rest_framework/vertical/select_multiple.html b/rest_framework/templates/rest_framework/vertical/select_multiple.html
index 81b25c2a3..2bb3d5ae4 100644
--- a/rest_framework/templates/rest_framework/vertical/select_multiple.html
+++ b/rest_framework/templates/rest_framework/vertical/select_multiple.html
@@ -2,20 +2,25 @@
{% trans "No items to select." as no_items %}
- {% if field.label %}
-
- {% endif %}
-
- {% for key, text in field.choices.items %}
-
- {% empty %}
-
- {% endfor %}
-
+ {% if field.label %}
+
+ {% endif %}
+
+
+ {% for key, text in field.choices.items %}
+
+ {% empty %}
+
+ {% endfor %}
+
+
{% if field.errors %}
- {% for error in field.errors %}{{ error }}{% endfor %}
+ {% for error in field.errors %}{{ error }}{% endfor %}
{% endif %}
+
{% if field.help_text %}
- {{ field.help_text }}
+ {{ field.help_text }}
{% endif %}
diff --git a/rest_framework/templates/rest_framework/vertical/textarea.html b/rest_framework/templates/rest_framework/vertical/textarea.html
index 840ea853c..93a27f921 100644
--- a/rest_framework/templates/rest_framework/vertical/textarea.html
+++ b/rest_framework/templates/rest_framework/vertical/textarea.html
@@ -1,12 +1,17 @@
- {% if field.label %}
-
- {% endif %}
-
- {% if field.errors %}
- {% for error in field.errors %}{{ error }}{% endfor %}
- {% endif %}
- {% if field.help_text %}
- {{ field.help_text }}
- {% endif %}
+ {% if field.label %}
+
+ {% endif %}
+
+
+
+ {% if field.errors %}
+ {% for error in field.errors %}{{ error }}{% endfor %}
+ {% endif %}
+
+ {% if field.help_text %}
+ {{ field.help_text }}
+ {% endif %}