aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkotibold2011-06-26 01:32:27 +0200
committermarkotibold2011-06-26 01:32:27 +0200
commit0b18b58c170aae0c2a93a608997e557fdcefe826 (patch)
tree69a1d1e80c1e1b042a24892e7562867a1255e853
parent43c63c60ce8e89dbdb8e102f1c7ce1cd11fa8808 (diff)
downloaddjango-rest-framework-0b18b58c170aae0c2a93a608997e557fdcefe826.tar.bz2
On 403's no forms will be displayed anymore
-rw-r--r--djangorestframework/templates/renderer.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/djangorestframework/templates/renderer.html b/djangorestframework/templates/renderer.html
index 507b5c25..44e032aa 100644
--- a/djangorestframework/templates/renderer.html
+++ b/djangorestframework/templates/renderer.html
@@ -60,8 +60,8 @@
</form>
{% endif %}
- {# Only display the POST/PUT/DELETE forms if method tunneling via POST forms is enabled. #}
- {% if METHOD_PARAM %}
+ {# 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 'POST' in view.allowed_methods %}
<form action="{{ request.get_full_path }}" method="post" {% if post_form.is_multipart %}enctype="multipart/form-data"{% endif %}>