aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/templates
diff options
context:
space:
mode:
authorTom Christie2014-11-20 13:43:38 +0000
committerTom Christie2014-11-20 13:43:38 +0000
commit6ec96d0bac1e738aceec9f8c21282c172120c7ac (patch)
tree33481b5daa191212fb609ee1bb61a8e3efc44c78 /rest_framework/templates
parent9c6bead8b6d3f9ae11e9859ed305e8d0f7a9e0d8 (diff)
downloaddjango-rest-framework-6ec96d0bac1e738aceec9f8c21282c172120c7ac.tar.bz2
Resolve PUT and POST buttons in browsable API
Diffstat (limited to 'rest_framework/templates')
-rw-r--r--rest_framework/templates/rest_framework/api_form.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/rest_framework/templates/rest_framework/api_form.html b/rest_framework/templates/rest_framework/api_form.html
new file mode 100644
index 00000000..96f924ed
--- /dev/null
+++ b/rest_framework/templates/rest_framework/api_form.html
@@ -0,0 +1,8 @@
+{% load rest_framework %}
+{% csrf_token %}
+{% for field in form %}
+ {% if not field.read_only %}
+ {% render_field field style=style %}
+ {% endif %}
+{% endfor %}
+<!-- form.non_field_errors -->