{% load urlize_quoted_links %}{% load add_query_param %} API - {{ resource.name }}
Django REST framework {% if user.is_active %}Welcome, {{ user }}.{% if logout_url %} Log out{% endif %}{% else %}Not logged in {% if login_url %}Log in{% endif %}{% endif %}

{{ resource.name }}

{{ resource.description|linebreaksbr }}

{{ response.status }} {{ response.status_text }}{% autoescape off %}
{% for key, val in response.headers.items %}{{ key }}: {{ val|urlize_quoted_links }}
{% endfor %}
{{ content|urlize_quoted_links }}
{% endautoescape %} {% if 'GET' in resource.allowed_methods %}
GET
{% endif %} {% comment %} *** Only display the POST/PUT/DELETE forms if we have a bound form, and if method *** *** tunneling via POST forms is enabled. *** *** (We could display only the POST form if method tunneling is disabled, but I think *** *** the user experience would be confusing, so we simply turn all forms off. *** {% endcomment %} {% if resource.METHOD_PARAM and form %} {% if 'POST' in resource.allowed_methods %}
{% csrf_token %} {{ form.non_field_errors }} {% for field in form %}
{{ field.label_tag }}: {{ field }} {{ field.help_text }} {{ field.errors }}
{% endfor %}
{% endif %} {% if 'PUT' in resource.allowed_methods %}
{% csrf_token %} {{ form.non_field_errors }} {% for field in form %}
{{ field.label_tag }}: {{ field }} {{ field.help_text }} {{ field.errors }}
{% endfor %}
{% endif %} {% if 'DELETE' in resource.allowed_methods %}
{% csrf_token %}
{% endif %} {% endif %}