Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
{% load staticfiles %}
{% load i18n %}

<!DOCTYPE html>
<html>
  <head>
    {% block head %}
      <meta charset="utf-8">
      <meta name="viewport"
            content="width=device-width, initial-scale=1, maximum-scale=1">

      <title>{% block title %}{% if name %}{{ name }} – {% endif %}API Browser{% endblock %}</title>

      <meta name="author"
            content="{% block author %}Nick Frezynski <nick@frez.me>{% endblock %}">

      <link rel="shortcut icon"
            href="{% block favicon %}{% static 'api_browser/img/favicon.ico' %}?v=1{% endblock %}">

      {% block stylesheets %}
        <link rel="stylesheet" type="text/css"
              href="https://fonts.googleapis.com/css?family=Roboto:400,300,500">

        {% block reStructuredText_style %}
          {# Styling for reStructuredText documentation (docutils defaults) #}
          <link rel="stylesheet" type="text/css"
                href="{% static 'rest_framework/css/reStructuredText-html5.css' %}">
        {% endblock reStructuredText_style %}

        {% block pygments_style %}
          <style>{{ pygments_css }}</style>
        {% endblock pygments_style %}
      {% endblock stylesheets %}

    {% endblock head %}
  </head>

  <body>
    {% block body %}

      {% block page_header %}
        <h1>{{ name }}</h1>
      {% endblock page_header %}

      <div class="description-section">
        {% block description %}
          {{ description }}
        {% endblock %}
      </div>

      {% block profile %}
        <div class="profile-section">
          <h2>Profile</h2>
          {% block profile_accepts %}
            <h3>Accepts</h3>
            <ul>
              {% for f in metadata_parses %}
                <li>{{ f }}</li>
              {% endfor %}
            </ul>
          {% endblock profile_accepts %}

          {% block profile_renders %}
            <h3>Renders</h3>
            <ul>
              {% for f in metadata_renders %}
                <li>{{ f }}</li>
              {% endfor %}
            </ul>
          {% endblock profile_renders %}

          {% block profile_actions %}
            <h3>Actions</h3>
            <ul>
              {% for action, attrs in metadata_actions.items %}
                <li>
                  <h4>{{ action }}</h4>
                  <ul>
                    {% for attr, fields in attrs.items %}
                      <li>
                        {{ attr }}
                        <ul>
                          {% for k, v in fields.items %}
                            <li>{{ k }}: {{ v }}</li>
                          {% endfor %}
                        </ul>
                      </li>
                    {% endfor %}
                  </ul>
                </li>
              {% endfor %}
            </ul>
          {% endblock profile_actions %}
        </div>
      {% endblock profile %}

      <div class="response-headers">
        <h2>Response Headers</h2>
        <dl>
          <dt>{{ request.method }}</dt>
          <dd>{{ request.get_full_path }}
        </dl>
        <dl>
          <dt>HTTP {{ response.status_code }} {{ response.status_text }}</dt>
        </dl>
        {% autoescape off %}
          {% for key, val in response_headers.items %}
            <dl>
              <dt>{{ key }}</dt>
              <dd>{{ val }}</dd>
            </dl>
          {% endfor %}
        {% endautoescape %}
      </div>

      <div class="response-body">
        <h2>Response Body</h2>
        {% autoescape off %}
          {{ content|safe }}
        {% endautoescape %}
      </div>

      <div class="live-editor">

      {% if display_edit_forms %}
        <div id="edit_forms">
          {% if post_form %}
            {% with form=post_form %}
              <form action="{{ request.get_full_path }}"
                    method="POST"
                    enctype="multipart/form-data">
                <fieldset>
                  {% csrf_token %}
                  {{ post_form }}
                  <div class="form-actions">
                    <button title="Make a POST request on the {{ name }} resource">
                      POST
                    </button>
                  </div>
                </fieldset>
              </form>
            {% endwith %}
          {% endif %}

          {% if put_form %}
            <form action="{{ request.get_full_path }}"
                  data-method="PUT"
                  enctype="multipart/form-data">
              <fieldset>
                {{ put_form }}
                <div class="form-actions">
                  <button title="Make a PUT request on the {{ name }} resource">
                    PUT
                  </button>
                </div>
              </fieldset>
            </form>
          {% endif %}
        </div>
      {% endif %}

      {% block footer %}{% endblock %}


      {% block javascript %}
        <script type="text/javascript" src="{% static 'api_browser/js/main.js' %}"></script>
      {% endblock javascript %}
      {# Pages that extend this template can put Javascript here. #}
      {% block js %}{% endblock %}

    {% endblock body %}
  </body>
</html>