diff --git a/rest_framework/static/rest_framework/css/default.css b/rest_framework/static/rest_framework/css/default.css index cfd41460c..b569b1f5c 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 4b42778fe..d0a25e2e8 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 %}