diff options
Diffstat (limited to 'djangorestframework/templates/renderer.html')
| -rw-r--r-- | djangorestframework/templates/renderer.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/djangorestframework/templates/renderer.html b/djangorestframework/templates/renderer.html index bda49e6f..18e60110 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" /> @@ -41,12 +41,12 @@ <h1>{{ name }}</h1> <p>{{ description }}</p> <div class='module'> - <pre><b>{{ response.status }} {{ response.status_text }}</b>{% autoescape off %} -{% for key, val in response.headers.items %}<b>{{ key }}:</b> {{ val|urlize_quoted_links }} + <pre><b>{{ response.status_code }} {{ response.status_text }}</b>{% autoescape off %} +{% 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> @@ -63,9 +63,9 @@ {% endif %} {# 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 != 403 %} + {% 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> |
