mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-25 00:34:21 +03:00
On 403's no forms will be displayed anymore
This commit is contained in:
parent
43c63c60ce
commit
0b18b58c17
|
@ -60,8 +60,8 @@
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# Only display the POST/PUT/DELETE forms if method tunneling via POST forms is enabled. #}
|
{# 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 %}
|
{% if METHOD_PARAM and response.status != 403 %}
|
||||||
|
|
||||||
{% if 'POST' in view.allowed_methods %}
|
{% if 'POST' in view.allowed_methods %}
|
||||||
<form action="{{ request.get_full_path }}" method="post" {% if post_form.is_multipart %}enctype="multipart/form-data"{% endif %}>
|
<form action="{{ request.get_full_path }}" method="post" {% if post_form.is_multipart %}enctype="multipart/form-data"{% endif %}>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user