diff --git a/djangorestframework/static/djangorestframework/css/style.css b/djangorestframework/static/djangorestframework/css/style.css index 8ab895105..3d6fdbdc2 100644 --- a/djangorestframework/static/djangorestframework/css/style.css +++ b/djangorestframework/static/djangorestframework/css/style.css @@ -30,4 +30,17 @@ h2, h3 { .format-option { font-family: Menlo, Consolas, "Andale Mono", "Lucida Console", monospace; +} + +#options-form { + position: relative; +} + +/* To allow tooltips to work on disabled elements */ +.disabled-tooltip-shield { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; } \ No newline at end of file diff --git a/djangorestframework/templates/djangorestframework/base.html b/djangorestframework/templates/djangorestframework/base.html index 8f99ae5c9..a81c2fb79 100644 --- a/djangorestframework/templates/djangorestframework/base.html +++ b/djangorestframework/templates/djangorestframework/base.html @@ -64,11 +64,14 @@
- {% if 'OPTIONS' in allowed_methods and api_settings.FORM_METHOD_OVERRIDE %} -
+ {% if api_settings.FORM_METHOD_OVERRIDE %} + {% csrf_token %} - + + {% if not 'OPTIONS' in allowed_methods %} +
+ {% endif %}
{% endif %}