{% extends "kegadmin/base.html" %}
{% load kegweblib %}
{% load crispy_forms_tags %}

{% block title %}Kegbot Admin: Logs | {{ block.super }}{% endblock %}
{% block pagetitle %}Kegbot Admin: Logs{% endblock %}

{% block kegadmin-main %}
{% if errors %}
<p class="lead">
  {{ errors|length }} error{{ errors|length|pluralize }} recorded:
</p>

{% for error in errors %}
<h4>
  {{ error.summary }}
  <small>{{ error.when }}</small>
</h4>
{% if error.request_path %}
<code>{{ error.method }} {{ error.request_path }}</code>
{% if error.username %}
({{ error.username }})
{% endif %}
{% endif %}
<pre>
{{ error.exc_text }}
</pre>
{% endfor %}

{% else %}
<p>
  No errors are available.
</p>
{% endif %}

{% endblock %}
