From 821844bb11e5262fb0dfc2fecf2add8fe18d3210 Mon Sep 17 00:00:00 2001 From: Sébastien Piquemal Date: Tue, 14 Feb 2012 10:05:28 +0200 Subject: fixed examples, corrected small bugs in the process --- djangorestframework/templates/renderer.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'djangorestframework/templates') diff --git a/djangorestframework/templates/renderer.html b/djangorestframework/templates/renderer.html index 8b5c77c7..808d9664 100644 --- a/djangorestframework/templates/renderer.html +++ b/djangorestframework/templates/renderer.html @@ -29,7 +29,7 @@
- {% if 'OPTIONS' in view.allowed_methods %} + {% if 'OPTIONS' in allowed_methods %}
{% csrf_token %} @@ -42,11 +42,11 @@

{{ description }}

{{ response.status_code }} {{ response.status_text }}{% autoescape off %}
-{% for key, val in response.headers.items %}{{ key }}: {{ val|urlize_quoted_links }}
+{% for key, val in response.items %}{{ key }}: {{ val|urlize_quoted_links }}
 {% endfor %}
 {{ content|urlize_quoted_links }}
{% endautoescape %}
- {% if 'GET' in view.allowed_methods %} + {% if 'GET' in allowed_methods %}

GET {{ name }}

@@ -65,7 +65,7 @@ {# Only display the POST/PUT/DELETE forms if method tunneling via POST forms is enabled and the user has permissions on this view. #} {% if METHOD_PARAM and response.status_code != 403 %} - {% if 'POST' in view.allowed_methods %} + {% if 'POST' in allowed_methods %}

POST {{ name }}

@@ -86,7 +86,7 @@ {% endif %} - {% if 'PUT' in view.allowed_methods %} + {% if 'PUT' in allowed_methods %}

PUT {{ name }}

@@ -108,7 +108,7 @@ {% endif %} - {% if 'DELETE' in view.allowed_methods %} + {% if 'DELETE' in allowed_methods %}

DELETE {{ name }}

-- cgit v1.2.3