From 758bcf5b1ead34ee66f443cf4d77badd93247a88 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Tue, 25 Sep 2012 13:35:41 +0100 Subject: Tweak browseable API --- .../static/rest_framework/css/default.css | 9 ++--- rest_framework/templates/rest_framework/base.html | 38 +++++++++------------- 2 files changed, 18 insertions(+), 29 deletions(-) diff --git a/rest_framework/static/rest_framework/css/default.css b/rest_framework/static/rest_framework/css/default.css index cfd41460..b569b1f5 100644 --- a/rest_framework/static/rest_framework/css/default.css +++ b/rest_framework/static/rest_framework/css/default.css @@ -40,8 +40,9 @@ h2, h3 { font-family: Menlo, Consolas, "Andale Mono", "Lucida Console", monospace; } -#options-form { - position: relative; +.button-form { + float: right; + margin-right: 1em; } /* To allow tooltips to work on disabled elements */ @@ -53,10 +54,6 @@ h2, h3 { left: 0; } -#options-form { - margin-right: 1em; -} - .errorlist { margin-top: 0.5em; } diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index 4b42778f..d0a25e2e 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -71,7 +71,7 @@
- GET + GET - {% if not 'OPTIONS' in allowed_methods %} -
- {% endif %} + + + {% endif %} + + {% if 'DELETE' in allowed_methods and api_settings.FORM_METHOD_OVERRIDE %} +
+ {% csrf_token %} + +
{% endif %} @@ -133,7 +138,7 @@
{% endfor %}
- +
@@ -157,26 +162,13 @@ {% endfor %}
- +
{% endif %} - {% if 'DELETE' in allowed_methods and api_settings.FORM_METHOD_OVERRIDE %} -
-
-

DELETE: {{ name }}

- {% csrf_token %} - -
- -
-
-
- {% endif %} - {% endif %} -- cgit v1.2.3