aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/templates
diff options
context:
space:
mode:
authortom christie tom@tomchristie.com2011-04-02 16:32:37 +0100
committertom christie tom@tomchristie.com2011-04-02 16:32:37 +0100
commit4687db680cda52e9836743940e4cf7279b307294 (patch)
tree23b9b22eee3c08f6de09295b3c6630f5fb0730fa /djangorestframework/templates
parent8845b281fe9aafbc9f9b2a283fafbde9787f4734 (diff)
downloaddjango-rest-framework-4687db680cda52e9836743940e4cf7279b307294.tar.bz2
Refactor to use self.CONTENT to access request body. Get file upload working
Diffstat (limited to 'djangorestframework/templates')
-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" />