mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-27 03:54:01 +03:00
Add tooltips to other methods
This commit is contained in:
parent
c499fa0010
commit
9ded9d232c
|
@ -72,10 +72,10 @@
|
|||
</form>
|
||||
{% endif %}
|
||||
|
||||
<div class='content-main'>
|
||||
<div class="content-main">
|
||||
<div class="page-header"><h1>{{ name }}</h1></div>
|
||||
<p>{{ description }}</p>
|
||||
<div class='module'>
|
||||
<div class="response-content">
|
||||
<pre><b>HTTP {{ response.status_code }} {{ response.status_text }}</b>{% autoescape off %}
|
||||
{% for key, val in response.items %}<b>{{ key }}:</b> {{ val|urlize_quoted_links }}
|
||||
{% endfor %}
|
||||
|
@ -84,7 +84,7 @@
|
|||
|
||||
{% if 'GET' in allowed_methods %}
|
||||
<form>
|
||||
<fieldset class='module aligned'>
|
||||
<fieldset>
|
||||
<h2>GET: {{ name }}</h2>
|
||||
|
||||
<div class="btn-group format-selection">
|
||||
|
@ -100,10 +100,6 @@
|
|||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% comment %}
|
||||
DROP POST/PUT/DELETE until the forms are working with REST framework 2
|
||||
|
||||
{# Only display the POST/PUT/DELETE forms if method tunneling via POST forms is enabled and the user has permissions on this view. #}
|
||||
{% if response.status_code != 403 %}
|
||||
|
||||
{% if 'POST' in allowed_methods %}
|
||||
|
@ -121,7 +117,7 @@
|
|||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<button class="btn btn-primary">POST</button>
|
||||
<button class="btn btn-primary" title="Do a POST request on the {{ name }} resource">POST</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
@ -142,7 +138,7 @@
|
|||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<button class="btn btn-primary">PUT</button>
|
||||
<button class="btn btn-primary js-tooltip" title="Do a PUT request on the {{ name }} resource">PUT</button>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
@ -154,13 +150,13 @@
|
|||
<h2>DELETE: {{ name }}</h2>
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="{{ api_settings.FORM_METHOD_OVERRIDE }}" value="DELETE" />
|
||||
<button class="btn btn-danger">DELETE</button>
|
||||
<button class="btn btn-danger js-tooltip" title="Do a DELETE request on the {{ name }} resource">DELETE</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% endcomment %}
|
||||
|
||||
</div>
|
||||
<!-- END content-main -->
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user