{% load i18n %}

<h4>{% trans 'View information' %}</h4>
<table>
	<thead>
		<tr>
			<th>{% trans 'View Function' %}</th>
			<th>{% trans 'args' %}</th>
			<th>{% trans '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 forloop.last %}, {% endif %}
				{% endfor %}
			{% else %}
				None
			{% endif %}
			</td>
		</tr>
	</tbody>
</table>

<h4>{% trans 'COOKIES Variables' %}</h4>
{% if cookies %}
	<table>
		<colgroup>
			<col style="width:20%"/>
			<col/>
		</colgroup>
		<thead>
			<tr>
				<th>{% trans "Variable" %}</th>
				<th>{% trans "Value" %}</th>
			</tr>
		</thead>
		<tbody>
			{% for key, value in cookies %}
				<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
					<td>{{ key|escape }}</td>
					<td>{{ value|escape }}</td>
				</tr>
			{% endfor %}
		</tbody>
	</table>
{% else %}
	<p>{% trans "No COOKIE data" %}</p>
{% endif %}

<h4>{% trans 'SESSION Variables' %}</h4>
{% if session %}
	<table>
		<colgroup>
			<col style="width:20%"/>
			<col/>
		</colgroup>
		<thead>
			<tr>
				<th>{% trans "Variable" %}</th>
				<th>{% trans "Value" %}</th>
			</tr>
		</thead>
		<tbody>
			{% for key, value in session %}
				<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
					<td>{{ key|escape }}</td>
					<td>{{ value|escape }}</td>
				</tr>
			{% endfor %}
		</tbody>
	</table>
{% else %}
	<p>{% trans "No SESSION data" %}</p>
{% endif %}

<h4>{% trans 'GET Variables' %}</h4>
{% if get %}
	<table>
		<thead>
			<tr>
				<th>{% trans "Variable" %}</th>
				<th>{% trans "Value" %}</th>
			</tr>
		</thead>
		<tbody>
			{% for key, value in get %}
				<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
					<td>{{ key|escape }}</td>
					<td>{{ value|join:", "|escape }}</td>
				</tr>
			{% endfor %}
		</tbody>
	</table>
{% else %}
	<p>{% trans "No GET data" %}</p>
{% endif %}

<h4>{% trans 'POST Variables' %}</h4>
{% if post %}
	<table>
		<thead>
			<tr>
				<th>{% trans "Variable" %}</th>
				<th>{% trans "Value" %}</th>
			</tr>
		</thead>
		<tbody>
			{% for key, value in post %}
				<tr class="{% cycle 'row1' 'row2' %}">
					<td>{{ key|escape }}</td>
					<td>{{ value|join:", "|escape }}</td>
				</tr>
			{% endfor %}
		</tbody>
	</table>
{% else %}
	<p>{% trans "No POST data" %}</p>
{% endif %}
