From fe4c4fa75147f114e014c3d6623d84de35c01fe7 Mon Sep 17 00:00:00 2001 From: Tanner Hobson Date: Fri, 16 Sep 2016 22:09:49 -0400 Subject: [PATCH] Fix indentation regression in API listing (#4493) In commit 5392be4ddba37da3e50c3feabc8b3b1c944481a8, there was a change made when cleaning up the template for the API listing that caused 2 spaces to appear before every header item (except the first) and before the first line of the body of the response. This meant that it often looked like: HTTP 200 OK Allow: GET, OPTIONS Content-Type: application/json Vary: Accept { "key": "value", "key2": "value2" } This change removes those leading spaces, so that it will now look like: HTTP 200 OK Allow: GET, OPTIONS Content-Type: application/json Vary: Accept { "key": "value", "key2": "value2" } --- rest_framework/templates/rest_framework/base.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index 7f5170a62..5df23b767 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -150,10 +150,10 @@
-
HTTP {{ response.status_code }} {{ response.status_text }}{% autoescape off %}
-  {% for key, val in response_headers.items %}{{ key }}: {{ val|break_long_headers|urlize_quoted_links }}
-  {% endfor %}
-  {{ content|urlize_quoted_links }}
{% endautoescape %} +
HTTP {{ response.status_code }} {{ response.status_text }}{% autoescape off %}{% for key, val in response_headers.items %}
+{{ key }}: {{ val|break_long_headers|urlize_quoted_links }}{% endfor %}
+
+{{ content|urlize_quoted_links }}
{% endautoescape %}