From c499fa0010b03e80aa1084962a97b12eef783f67 Mon Sep 17 00:00:00 2001 From: Alec Perkins Date: Fri, 7 Sep 2012 16:49:55 -0400 Subject: Apply Bootstrap to in-page request forms. Includes tooltips using the title attributes.--- .../templates/djangorestframework/base.html | 56 ++++++++++++---------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/djangorestframework/templates/djangorestframework/base.html b/djangorestframework/templates/djangorestframework/base.html index a750502b..957bfcda 100644 --- a/djangorestframework/templates/djangorestframework/base.html +++ b/djangorestframework/templates/djangorestframework/base.html @@ -65,11 +65,11 @@
{% if 'OPTIONS' in allowed_methods and api_settings.FORM_METHOD_OVERRIDE %} -
- {% csrf_token %} - - -
+
+ {% csrf_token %} + + +
{% endif %}
@@ -85,15 +85,17 @@ {% if 'GET' in allowed_methods %}
-

GET {{ name }}

-
- GET - {% for format in available_formats %} - {% with FORMAT_PARAM|add:"="|add:format as param %} - [{{ format }}] - {% endwith %} - {% endfor %} -
+

GET: {{ name }}

+ +
+ GET + {% for format in available_formats %} + {% with FORMAT_PARAM|add:"="|add:format as param %} + {{ format }} + {% endwith %} + {% endfor %} +
+
{% endif %} @@ -107,7 +109,7 @@ {% if 'POST' in allowed_methods %}
-

POST {{ name }}

+

POST: {{ name }}

{% csrf_token %} {{ post_form.non_field_errors }} {% for field in post_form %} @@ -118,9 +120,8 @@ {{ field.errors }}
{% endfor %} -
- -
+ + {% endif %} @@ -128,7 +129,7 @@ {% if 'PUT' in allowed_methods and api_settings.FORM_METHOD_OVERRIDE %}
-

PUT {{ name }}

+

PUT: {{ name }}

{% csrf_token %} {{ put_form.non_field_errors }} @@ -140,9 +141,9 @@ {{ field.errors }}
{% endfor %} -
- -
+ + + {% endif %} @@ -150,12 +151,10 @@ {% if 'DELETE' in allowed_methods and api_settings.FORM_METHOD_OVERRIDE %}
-

DELETE {{ name }}

+

DELETE: {{ name }}

{% csrf_token %} -
- -
+
{% endif %} @@ -172,5 +171,10 @@ + -- cgit v1.2.3