mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-14 05:36:50 +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 %}">
|
<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'>
|
<div class='content-main'>
|
||||||
<h1>{{ name }}</h1>
|
<h1>{{ name }}</h1>
|
||||||
<p>{% if markeddown %}{% autoescape off %}{{ markeddown }}{% endautoescape %}{% else %}{{ description|linebreaksbr }}{% endif %}</p>
|
<p>{% if markeddown %}{% autoescape off %}{{ markeddown }}{% endautoescape %}{% else %}{{ description|linebreaksbr }}{% endif %}</p>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user