From 3195f72784a2d55d10f3d7a58acdfee694e89e4b Mon Sep 17 00:00:00 2001 From: Michael Elovskikh Date: Fri, 15 Feb 2013 16:39:24 +0600 Subject: [PATCH] POST form using new form.html template --- .../templates/rest_framework/base.html | 27 +++++++------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index 87e5dc04e..fb541e944 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -125,25 +125,16 @@ {% if post_form %}
-
-
- {% csrf_token %} - {{ post_form.non_field_errors }} - {% for field in post_form %} -
- {{ field.label_tag|add_class:"control-label" }} -
- {{ field }} - {{ field.help_text }} - -
+ {% with form=post_form %} + +
+ {% include "rest_framework/form.html" %} +
+
- {% endfor %} -
- -
-
- +
+ + {% endwith %}
{% endif %}