{% 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 }}
  </h4>
  {% if error.request_path %}
  <code>{{ error.method }} {{ error.request_path }}</code>
  <span class="muted">
  {{ error.when }}
  {% if error.username %}
  &bull; Remote User: {{ error.username }}
  {% endif %}
  </span>
  {% endif %}

  {% if error.exc_text %}
  <pre>{{ error.exc_text }}</pre>
  {% endif %}
  <hr/>
{% endfor %}

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

{% endblock %}
