{% load urlize_quoted_links %} {% load add_query_param %} {% load static %} Django REST framework - {{ name }}
{% if 'OPTIONS' in allowed_methods %}
{% csrf_token %}
{% endif %}

{{ name }}

{{ description }}

{{ response.status_code }} {{ response.status_text }}{% autoescape off %}
{% for key, val in response.items %}{{ key }}: {{ val|urlize_quoted_links }}
{% endfor %}
{{ content|urlize_quoted_links }}
{% endautoescape %}
{% if 'GET' in allowed_methods %}

GET {{ name }}

GET {% for format in available_formats %} {% with FORMAT_PARAM|add:"="|add:format as param %} [{{ format }}] {% endwith %} {% endfor %}
{% endif %} {# Only display the POST/PUT/DELETE forms if method tunneling via POST forms is enabled and the user has permissions on this view. #} {% if METHOD_PARAM and response.status_code != 403 %} {% if 'POST' in allowed_methods %}

POST {{ name }}

{% csrf_token %} {{ post_form.non_field_errors }} {% for field in post_form %}
{{ field.label_tag }} {{ field }} {{ field.help_text }} {{ field.errors }}
{% endfor %}
{% endif %} {% if 'PUT' in allowed_methods %}

PUT {{ name }}

{% csrf_token %} {{ put_form.non_field_errors }} {% for field in put_form %}
{{ field.label_tag }} {{ field }} {{ field.help_text }} {{ field.errors }}
{% endfor %}
{% endif %} {% if 'DELETE' in allowed_methods %}

DELETE {{ name }}

{% csrf_token %}
{% endif %} {% endif %}