diff options
Diffstat (limited to 'djangorestframework/templates/renderer.html')
| -rw-r--r-- | djangorestframework/templates/renderer.html | 12 |
1 files changed, 6 insertions, 6 deletions
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 @@ <div id="content" class="{% block coltype %}colM{% endblock %}"> - {% if 'OPTIONS' in view.allowed_methods %} + {% if 'OPTIONS' in allowed_methods %} <form action="{{ request.get_full_path }}" method="post"> {% csrf_token %} <input type="hidden" name="{{ METHOD_PARAM }}" value="OPTIONS" /> @@ -42,11 +42,11 @@ <p>{{ description }}</p> <div class='module'> <pre><b>{{ response.status_code }} {{ response.status_text }}</b>{% autoescape off %} -{% for key, val in response.headers.items %}<b>{{ key }}:</b> {{ val|urlize_quoted_links }} +{% for key, val in response.items %}<b>{{ key }}:</b> {{ val|urlize_quoted_links }} {% endfor %} {{ content|urlize_quoted_links }}</pre>{% endautoescape %}</div> - {% if 'GET' in view.allowed_methods %} + {% if 'GET' in allowed_methods %} <form> <fieldset class='module aligned'> <h2>GET {{ name }}</h2> @@ -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 %} <form action="{{ request.get_full_path }}" method="post" {% if post_form.is_multipart %}enctype="multipart/form-data"{% endif %}> <fieldset class='module aligned'> <h2>POST {{ name }}</h2> @@ -86,7 +86,7 @@ </form> {% endif %} - {% if 'PUT' in view.allowed_methods %} + {% if 'PUT' in allowed_methods %} <form action="{{ request.get_full_path }}" method="post" {% if put_form.is_multipart %}enctype="multipart/form-data"{% endif %}> <fieldset class='module aligned'> <h2>PUT {{ name }}</h2> @@ -108,7 +108,7 @@ </form> {% endif %} - {% if 'DELETE' in view.allowed_methods %} + {% if 'DELETE' in allowed_methods %} <form action="{{ request.get_full_path }}" method="post"> <fieldset class='module aligned'> <h2>DELETE {{ name }}</h2> |
