{% extends "base.html" %} {% load rest_framework %} {% load wger_extras %} {% load wger_extras %} {% block header %} {% endblock %} {% block title %}REST API - {{ name }}{% endblock %} {% block content %} {# #} {# Breadcrumbs #} {# #} {% block breadcrumbs %} {% endblock %} {# #} {# GET button #} {# #} {% if 'GET' in allowed_methods %}
GET
{% endif %} {# #} {# OPTIONS button #} {# #} {% if options_form %}
{% csrf_token %}
{% endif %} {# #} {# DELETE button #} {# #} {% if delete_form %}
{% csrf_token %}
{% endif %}
{# #} {# Object/endpoint description #} {# #}
{% block description %}

{{ description }}

{% endblock %}
{{ request.method }} {{ request.get_full_path }}
HTTP {{ response.status_code }} {{ response.status_text }}{% autoescape off %} {% for key, val in response_headers.items %}{{ key }}: {{ val|break_long_headers|urlize_quoted_links }} {% endfor %}
{{ content|urlize_quoted_links }}
{% endautoescape %}
{# #} {# Forms #} {# #} {% if display_edit_forms %} {% if post_form or raw_data_post_form %}

Edit form

{% with form=raw_data_post_form %}
{% render_form_fields form 'POST' %}
{% endwith %} {% endif %} {% if put_form or raw_data_put_form or raw_data_patch_form %}

Edit form

{% with form=raw_data_put_or_patch_form %}
{% csrf_token %} {% for field in form %} {% render_form_field field %} {% endfor %}
{% if raw_data_put_form %} {% endif %} {% if raw_data_patch_form %} {% endif %}
{% endwith %} {% endif %} {% endif %} {% endblock %} {% block sidebar %}

Info

This live browsing view was copied and adapted from Django REST framework, who also powers the API behind the scenes.

{% endblock %}