File: base.html

package info (click to toggle)
flask-api 1.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 304 kB
  • sloc: python: 1,395; sh: 20; makefile: 11
file content (190 lines) | stat: -rw-r--r-- 8,788 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!DOCTYPE html>
<html>
    <head>
    {% block head %}

        {% block meta %}
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta name="robots" content="NONE,NOARCHIVE" />
        {% endblock %}

        <title>{% block title %}Flask API{% endblock %}</title>

        {% block style %}
        {% block bootstrap_theme %}
            <link rel="stylesheet" type="text/css" href="{{url_for('flask-api.static', filename='css/bootstrap.min.css')}}"/>
            <link rel="stylesheet" type="text/css" href="{{url_for('flask-api.static', filename='css/bootstrap-tweaks.css')}}"/>
        {% endblock %}
        <link rel="stylesheet" type="text/css" href="{{url_for('flask-api.static', filename='css/prettify.css')}}"/>
        <link rel="stylesheet" type="text/css" href="{{url_for('flask-api.static', filename='css/default.css')}}"/>
        {% endblock %}

    {% endblock %}
    </head>

  <body class="{% block bodyclass %}{% endblock %} container">

    <div class="wrapper">

    {% block navbar %}
    <div class="navbar {% block bootstrap_navbar_variant %}navbar-inverse{% endblock %}">
        <div class="navbar-inner">
            <div class="container-fluid">
                <span href="/">
                    {% block branding %}<a class='brand' rel="nofollow" href='http://www.flaskapi.org'>Flask API <span class="version">{{ version }}</span></a>{% endblock %}
                </span>
                <ul class="nav pull-right">
                    {% block userlinks %}
                        <!--{ if user.is_authenticated }
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                    {{ user }}
                                    <b class="caret"></b>
                                </a>
                                <ul class="dropdown-menu">
                                    <li>optional_logout request</li>
                                </ul>
                            </li>
                        { else }-->
                            <li><!-- optional_login request --></li>
                        <!--{ endif }-->
                    {% endblock %}
                </ul>
            </div>
        </div>
    </div>
    {% endblock %}

    <!--
    {% block breadcrumbs %}
    <ul class="breadcrumb">
        {% for breadcrumb_name, breadcrumb_url in breadcrumblist %}
            <li>
                <a href="{{ breadcrumb_url }}" {% if forloop.last %}class="active"{% endif %}>{{ breadcrumb_name }}</a> {% if not forloop.last %}<span class="divider">&rsaquo;</span>{% endif %}
            </li>
        {% endfor %}
    </ul>
    {% endblock %}
    -->
    <div style="height: 50px"></div>

    <!-- Content -->
    <div id="content">

        {% if 'GET' in allowed_methods %}
            <form id="get-form" class="pull-right">
                <fieldset>
                    <div class="btn-group format-selection">
                        <a class="btn btn-primary js-tooltip" href='{{ request.url }}' rel="nofollow" title="Make a GET request on the {{ name }} resource">GET</a>

                        <button class="btn btn-primary dropdown-toggle js-tooltip" data-toggle="dropdown" title="Specify a format for the GET request">
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu">
                            {% for format in available_formats %}
                                <li>
                                    <a class="js-tooltip format-option" href='<!-- add_query_param request api_settings.URL_FORMAT_OVERRIDE format -->' rel="nofollow" title="Make a GET request on the {{ name }} resource with the format set to `{{ format }}`">{{ format }}</a>
                                </li>
                            {% endfor %}
                        </ul>
                    </div>

                </fieldset>
            </form>
        {% endif %}

        <!--{% if 'OPTIONS' in allowed_methods %}
            <form class="button-form" action="{{ request.url }}" method="POST" class="pull-right">
                <- csrf_token ->
                <input type="hidden" name="_method" value="OPTIONS" />
                <button class="btn btn-primary js-tooltip" title="Make an OPTIONS request on the resource">OPTIONS</button>
            </form>
        {% endif %}-->

        {% if 'DELETE' in allowed_methods %}
            <form class="button-form" action="{{ request.url }}" method="POST" class="pull-right">
                <!-- csrf_token -->
                <input type="hidden" name="_method" value="DELETE" />
                <button class="btn btn-danger js-tooltip" title="Make a DELETE request on the resource">DELETE</button>
            </form>
        {% endif %}

        <div class="content-main">
            <div class="page-header"><h1>{{ view_name }}</h1></div>
            {% if view_description %}<div style="margin-top: -10px; margin-bottom: 10px">{{ view_description|safe }}</div>{% endif %}
            <div class="request-info" style="clear: both" >
                <pre class="prettyprint"><b>{{ request.method }}</b> {{ request.url }}</pre>
            </div>
            <div class="response-info">
                <pre class="prettyprint"><div class="meta nocode"><b>HTTP {{ status }}</b>{% autoescape off %}
{% for key, val in headers.items() %}<b>{{ key }}:</b> <span class="lit">{{ val|e }}<!--{ val|break_long_headers|urlize_quoted_links }--></span>
{% endfor %}
</div>{% if content %}{{ content|urlize_quoted_links }}{% endif %}<!-- |urlize_quoted_links --></pre>{% endautoescape %}
            </div>
        </div>


                {% if 'POST' in allowed_methods or 'PUT' in allowed_methods or 'PATCH' in allowed_methods %}
                <div>
                    <div class="well">
                        <div id="generic-content-form">
                            <form action="{{ request.url }}" method="POST" class="form-horizontal">
                                <fieldset>
<div class="control-group">
        <label for="id__content_type" class="control-label">Media type:</label>
        <div class="controls">
            <select id="id__content_type" name="_content_type">
<option value="application/json" selected="selected">application/json</option>
<option value="application/x-www-form-urlencoded">application/x-www-form-urlencoded</option>
<option value="multipart/form-data">multipart/form-data</option>
</select>
            <span class="help-block"></span>
        </div>
    </div>
                                <div class="control-group">
                                    <label for="id__content" class="control-label">Content:</label>
                                    <div class="controls">
                                        <textarea name="_content" cols="40" rows="10"></textarea>
                                    </div>
                                </div>
                                <div class="form-actions">
                                    {% if 'POST' in allowed_methods %}
                                    <button class="btn btn-primary" title="Make a POST request on the resource">POST</button>
                                    {% endif %}
                                    {% if 'PUT' in allowed_methods %}
                                    <button class="btn btn-primary js-tooltip" name="_method" value="PUT" title="Make a PUT request on the resource">PUT</button>
                                    {% endif %}
                                    {% if 'PATCH' in allowed_methods %}
                                    <button class="btn btn-primary js-tooltip" name="_method" value="PATCH" title="Make a PATCH request on the resource">PATCH</button>
                                    {% endif %}
                                    </div>
                                </fieldset>
                            </form>
                        </div>
                    </div>
                </div>
                {% endif %}

        </div>
        <!-- END content-main -->

    </div>
    <!-- END Content -->

        <div id="push"></div>

    </div>

    </div><!-- ./wrapper -->

    {% block footer %}
    {% endblock %}

    {% block script %}
    <script src="{{url_for('flask-api.static', filename='js/jquery.min.js')}}"></script>
    <script src="{{url_for('flask-api.static', filename='js/bootstrap.min.js')}}"></script>
    <script src="{{url_for('flask-api.static', filename='js/prettify-min.js')}}"></script>
    <script src="{{url_for('flask-api.static', filename='js/default.js')}}"></script>
    {% endblock %}
  </body>
</html>