{% extends "base.html" %}
{% block comments %}
<!--
# Copyright (c) 2015 Riverbed Technology, Inc.
#
# This software is licensed under the terms and conditions of the MIT License
# accompanying the software ("License").  This software is distributed "AS IS"
# as set forth in the License.
-->
{% endblock %}

{% block header %}
    <style type="text/css">
    /*
    */
            /*
            html * { padding:0; margin:0; }
            body * { padding:10px 20px; }
            body * * { padding:0; }
            body { font:small sans-serif; }
            */
        body>div { border-bottom:1px solid #ddd; }
        h1 { font-weight:normal; }
        h2 { margin-bottom:.8em; }
        h2 span { font-size:80%; color:#666; font-weight:normal; }
        h3 { margin:1em 0 .5em 0; }
        h4 { margin:0 0 .5em 0; font-weight: normal; }
        code, pre { font-size: 100%; white-space: pre-wrap; }
        table { border:1px solid #ccc; border-collapse: collapse; width:100%; background:white; }
        tbody td, tbody th { vertical-align:top; padding:2px 3px; }
        thead th { padding:1px 6px 1px 3px; background:#fefefe; text-align:left; font-weight:normal; font-size:11px; border:1px solid #ddd; }
        tbody th { width:12em; text-align:right; color:#666; padding-right:.5em; }
        table.vars { margin:5px 0 2px 40px; }
        table.vars td, table.req td { font-family:monospace; }
        table td.code { width:100%; }
        table td.code pre { overflow:hidden; }
        table.source th { color:#666; }
        table.source td { font-family:monospace; white-space:pre; border-bottom:1px solid #eee; }
        ul.traceback { list-style-type:none; color: #222; }
        ul.traceback li.frame { padding-bottom:1em; color:#666; }
        ul.traceback li.user { background-color:#e0e0e0; color:#000 }
        div.context { padding:10px 0; overflow:hidden; }
        div.context ol { padding-left:30px; margin:0 10px; list-style-position: inside; }
        div.context ol li { font-family:monospace; white-space:pre; color:#777; cursor:pointer; }
        div.context ol li pre { display:inline; }
        div.context ol.context-line li { color:#505050; background-color:#dfdfdf; }
        div.context ol.context-line li span { position:absolute; right:32px; }
        .user div.context ol.context-line li { background-color:#bbb; color:#000; }
        .user div.context ol li { color:#666; }
        div.commands { margin-left: 40px; }
        div.commands a { color:#555; text-decoration:none; }
        .user div.commands a { color: black; }
        #summary { padding:10px 20px; font:small sans-serif; background: #ffc; }
        #summary p { font:medium sans-serif; }
        #summary h2 { font-weight: normal; color: #666; }
        #explanation { background:#eee; }
        #template, #template-not-exist { background:#f6f6f6; }
        #template-not-exist ul { margin: 0 0 0 20px; }
        #unicode-hint { background:#eee; }
        #traceback { background:#eee; }
        #requestinfo {font:small sans-serif;  background:#f6f6f6; padding-left:120px; }
        #summary table { border:none; background:transparent; }
        #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; }
        #requestinfo h3 { margin-bottom:-1em; }
        .error { background: #ffc; }
        .specific { color:#cc3300; font-weight:bold; }
        h2 span.commands { font-size:.7em;}
        span.commands a:link {color:#5E5694;}
        pre.exception_value { font-family: sans-serif; color: #666; font-size: 1.5em; margin: 10px 0 10px 0; }
    </style>
{% endblock %}

{% block content %}
    <div id="summary">
        <h1>Error Processing Report Configuration</h1>
        <p>Review changes you have made, using the debugging information presented here to help narrow down where the source of the problem may be
           and click <a href="/report/reload">Reload Configuration</a> after changes have been made.</p>
        <h2>{% if exception_type %}{{ exception_type }}{% else %}Report{% endif %}{% if request %} at {{ request.path_info|escape }}{% endif %}</h2>

        <h3 class="exception_value">{% if exception_value %}{{ exception_value|force_escape }}{% else %}No exception supplied{% endif %}</h3>

        <table class="meta">
            {% if request %}
                <tr>
                    <th>Request Method:</th>
                    <td>{{ request.META.REQUEST_METHOD }}</td>
                </tr>
                <tr>
                    <th>Request URL:</th>
                    <td>{{ request.build_absolute_uri|escape }}</td>
                </tr>
            {% endif %}
            <tr>
                <th>Django Version:</th>
                <td>{{ django_version_info }}</td>
            </tr>
            {% if exception_type %}
                <tr>
                    <th>Exception Type:</th>
                    <td>{{ exception_type }}</td>
                </tr>
            {% endif %}
            {% if exception_type and exception_value %}
                <tr>
                    <th>Exception Value:</th>
                    <td><pre>{{ exception_value|force_escape }}</pre></td>
                </tr>
            {% endif %}
            {% if lastframe %}
                <tr>
                    <th>Exception Location:</th>
                    <td>{{ lastframe.filename|escape }} in {{ lastframe.function|escape }}, line {{ lastframe.lineno }}</td>
                </tr>
            {% endif %}
            <tr>
                <th>Python Executable:</th>
                <td>{{ sys_executable|escape }}</td>
            </tr>
            <tr>
                <th>Python Version:</th>
                <td>{{ sys_version_info }}</td>
            </tr>
            <tr>
                <th>Python Path:</th>
                <td><pre>{{ sys_path|pprint }}</pre></td>
            </tr>
            <tr>
                <th>Server time:</th>
                <td>{{server_time|date:"r"}}</td>
            </tr>
        </table>
    </div>
    {% if unicode_hint %}
        <div id="unicode-hint">
            <h2>Unicode error hint</h2>
            <p>The string that could not be encoded/decoded was: <strong>{{ unicode_hint|force_escape }}</strong></p>
        </div>
    {% endif %}

    <div id="requestinfo">
        <h2>Request information</h2>

        {% if request %}
            <h3 id="meta-info">META</h3>
            <table class="req">
                <thead>
                <tr>
                    <th>Variable</th>
                    <th>Value</th>
                </tr>
                </thead>
                <tbody>
                {% for var in request.META.items|dictsort:"0" %}
                    <tr>
                        <td>{{ var.0 }}</td>
                        <td class="code"><pre>{{ var.1|pprint }}</pre></td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        {% else %}
            <p>Request data not supplied</p>
        {% endif %}
    </div>
{% endblock %}
