mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-13 13:16:55 +03:00
Add OPTIONS to auto-documenting API
This commit is contained in:
parent
e2f3153b13
commit
3a4ca88a6c
|
@ -35,6 +35,14 @@
|
|||
|
||||
<div id="content" class="{% block coltype %}colM{% endblock %}">
|
||||
|
||||
{% if 'OPTIONS' in view.allowed_methods %}
|
||||
<form action="{{ request.get_full_path }}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="{{ METHOD_PARAM }}" value="OPTIONS" />
|
||||
<input type="submit" value="OPTIONS" class="default" />
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
<div class='content-main'>
|
||||
<h1>{{ name }}</h1>
|
||||
<p>{% if markeddown %}{% autoescape off %}{{ markeddown }}{% endautoescape %}{% else %}{{ description|linebreaksbr }}{% endif %}</p>
|
||||
|
|
Loading…
Reference in New Issue
Block a user