1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-27 18:17:46 +00:00
bazarr/libs/flask_debugtoolbar/templates/panels/request_vars.html
Moravčík, Marian 443607a33d More work
2019-12-16 14:58:10 +01:00

104 lines
1.8 KiB
HTML

<h4>View information</h4>
<table>
<thead>
<tr>
<th>View Function</th>
<th>args</th>
<th>kwargs</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ view_func }}</td>
<td>{{ view_args|default("None") }}</td>
<td>
{% if view_kwargs.items() %}
{% for k, v in view_kwargs.items() %}
{{ k }}={{ v }}{% if not loop.last %}, {% endif %}
{% endfor %}
{% else %}
None
{% endif %}
</td>
</tr>
</tbody>
</table>
{% macro show_map(map) %}
<table>
<colgroup>
<col style="width:20%"/>
<col/>
</colgroup>
<thead>
<tr>
<th>Variable</th>
<th>Value</th>
</tr>
</thead>
<tbody>
{% for key, value in map %}
<tr class="{{ loop.cycle('flDebugOdd', 'flDebugEven') }}">
<td>{{ key|printable }}</td>
<td>{{ value|printable }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endmacro %}
<h4>COOKIES Variables</h4>
{% if cookies %}
{{ show_map(cookies) }}
{% else %}
<p>No COOKIE data</p>
{% endif %}
<h4>SESSION Variables</h4>
{% if session %}
{{ show_map(session) }}
{% else %}
<p>No SESSION data</p>
{% endif %}
{% macro show_multi_map(map) %}
<table>
<thead>
<tr>
<th>Variable</th>
<th>Value</th>
</tr>
</thead>
<tbody>
{% for key, value in map %}
<tr class="{{ loop.cycle('flDebugOdd', 'flDebugEven') }}">
<td>{{ key|printable }}</td>
<td>
{%- set sep = joiner() -%}
{%- for v in value -%}
{{ sep() }}{{ v|printable }}
{%- endfor -%}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endmacro %}
<h4>GET Variables</h4>
{% if get %}
{{ show_multi_map(get) }}
{% else %}
<p>No GET data</p>
{% endif %}
<h4>POST Variables</h4>
{% if post %}
{{ show_multi_map(post) }}
{% else %}
<p>No POST data</p>
{% endif %}