Debian Codegraph @

src/flask_debugtoolbar/templates/panels/request_vars.html

raw
1
2 <h4>View information</h4>
3 <table>
4 <thead>
5 <tr>
6 <th>View Function</th>
7 <th>kwargs</th>
8 </tr>
9 </thead>
10 <tbody>
11 <tr>
12 <td>{{ view_func }}</td>
13 <td>
14 {% if view_kwargs.items() %}
15 {% for k, v in view_kwargs.items() %}
16 {{ k }}={{ v }}{% if not loop.last %}, {% endif %}
17 {% endfor %}
18 {% else %}
19 None
20 {% endif %}
21 </td>
22 </tr>
23 </tbody>
24 </table>
25
26 {% macro show_map(map) %}
27 <table>
28 <colgroup>
29 <col style="width:20%"/>
30 <col/>
31 </colgroup>
32 <thead>
33 <tr>
34 <th>Variable</th>
35 <th>Value</th>
36 </tr>
37 </thead>
38 <tbody>
39 {% for key, value in map %}
40 <tr class="{{ loop.cycle('flDebugOdd', 'flDebugEven') }}">
41 <td>{{ key|printable }}</td>
42 <td>{{ value|printable }}</td>
43 </tr>
44 {% endfor %}
45 </tbody>
46 </table>
47 {% endmacro %}
48
49
50 <h4>COOKIES Variables</h4>
51 {% if cookies %}
52 {{ show_map(cookies) }}
53 {% else %}
54 <p>No COOKIE data</p>
55 {% endif %}
56
57 <h4>SESSION Variables</h4>
58 {% if session %}
59 {{ show_map(session) }}
60 {% else %}
61 <p>No SESSION data</p>
62 {% endif %}
63
64
65 {% macro show_multi_map(map) %}
66 <table>
67 <thead>
68 <tr>
69 <th>Variable</th>
70 <th>Value</th>
71 </tr>
72 </thead>
73 <tbody>
74 {% for key, value in map %}
75 <tr class="{{ loop.cycle('flDebugOdd', 'flDebugEven') }}">
76 <td>{{ key|printable }}</td>
77 <td>
78 {%- set sep = joiner() -%}
79 {%- for v in value -%}
80 {{ sep() }}{{ v|printable }}
81 {%- endfor -%}
82 </td>
83 </tr>
84 {% endfor %}
85 </tbody>
86 </table>
87 {% endmacro %}
88
89
90 <h4>GET Variables</h4>
91 {% if get %}
92 {{ show_multi_map(get) }}
93 {% else %}
94 <p>No GET data</p>
95 {% endif %}
96
97 <h4>POST Variables</h4>
98 {% if post %}
99 {{ show_multi_map(post) }}
100 {% else %}
101 <p>No POST data</p>
102 {% endif %}