{% load urlize_quoted_links %}{% load add_query_param %} Django REST framework - {{ name }}

{{ name }}

{% if markeddown %}{% autoescape off %}{{ markeddown }}{% endautoescape %}{% else %}{{ description|linebreaksbr }}{% endif %}

{{ 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 {{ name }}

GET {% for media_type in resource.emitted_media_types %} {% with resource.ACCEPT_QUERY_PARAM|add:"="|add:media_type as param %} [{{ media_type }}] {% endwith %} {% endfor %}
{% 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 %}

POST {{ name }}

{% 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 %}

PUT {{ name }}

{% 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 %}

DELETE {{ name }}

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