{% extends "silk/base/detail_base.html" %}
{% load filters %}
{% load nav %}
{% load inclusion %}
{% load staticfiles %}

{% block js %}
    {{ block.super }}
{% endblock %}

{% block style %}
    {{ block.super }}
    <link rel="stylesheet" href="{% static 'silk/css/summary.css' %}">
    <style>
        #query-info-div {
            margin-top: 15px;
        }

        #query-info-div .timestamp-div {
            font-size: 13px;

        }
    </style>
{% endblock %}

{% block menu %}
    {% profile_menu request profile silk_request %}
{% endblock %}

{% block data %}
    <div class="wrapper">
        <div id="query-div">
            <div id="query-info-div">
                {% profile_summary profile %}
            </div>
            <div class="heading">
                <div class="inner-heading">
                    {% if profile.file_path and profile.line_num %}
                        {{ profile.file_path }}:{{ profile.line_num }}{% if profile.end_line_num %}:{{ profile.end_line_num }}{% endif %}
                    {% else %}
                        Location
                    {% endif %}
                </div>
            </div>
            <div class="description">
                The below shows where in your code this profile was defined. If your profile was defined dynamically (i.e in your settings.py),
                then this will show the range of lines that are covered by the profiling.
            </div>
            {% if code %}
                <pre id="code"><code>{% code code actual_line %}</code></pre>
            {% elif code_error %}
                <div id="error-div">
                    {{ code_error }}
                </div>
            {% endif %}

        </div>
    </div>

{% endblock %}
