aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/templates/emitter.html
diff options
context:
space:
mode:
Diffstat (limited to 'djangorestframework/templates/emitter.html')
-rw-r--r--djangorestframework/templates/emitter.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/djangorestframework/templates/emitter.html b/djangorestframework/templates/emitter.html
index 798c5fb9..1931ad39 100644
--- a/djangorestframework/templates/emitter.html
+++ b/djangorestframework/templates/emitter.html
@@ -65,7 +65,7 @@
{% if resource.METHOD_PARAM and form %}
{% if 'POST' in resource.allowed_methods %}
- <form action="{{ request.path }}" method="post">
+ <form action="{{ request.path }}" method="post" {% if form.is_multipart %}enctype="multipart/form-data"{% endif %}>
<fieldset class='module aligned'>
<h2>POST {{ name }}</h2>
{% csrf_token %}
@@ -86,7 +86,7 @@
{% endif %}
{% if 'PUT' in resource.allowed_methods %}
- <form action="{{ request.path }}" method="post">
+ <form action="{{ request.path }}" method="post" {% if form.is_multipart %}enctype="multipart/form-data"{% endif %}>
<fieldset class='module aligned'>
<h2>PUT {{ name }}</h2>
<input type="hidden" name="{{ resource.METHOD_PARAM }}" value="PUT" />