diff options
Diffstat (limited to 'debug_toolbar/templates')
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/panels/cache.html | 6 | ||||
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/panels/staticfiles.html | 57 | 
2 files changed, 60 insertions, 3 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/panels/cache.html b/debug_toolbar/templates/debug_toolbar/panels/cache.html index 595afd6..82ccc49 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/cache.html +++ b/debug_toolbar/templates/debug_toolbar/panels/cache.html @@ -1,5 +1,5 @@  {% load i18n %} -<h3>{% trans "Summary" %}</h3> +<h4>{% trans "Summary" %}</h4>  <table>  	<thead>  	<tr> @@ -18,7 +18,7 @@  	</tr>  	</tbody>  </table> -<h3>{% trans "Commands" %}</h3> +<h4>{% trans "Commands" %}</h4>  <table>  	<thead>  	<tr> @@ -36,7 +36,7 @@  	</tbody>  </table>  {% if calls %} -<h3>{% trans "Calls" %}</h3> +<h4>{% trans "Calls" %}</h4>  <table>  	<thead>  		<tr> diff --git a/debug_toolbar/templates/debug_toolbar/panels/staticfiles.html b/debug_toolbar/templates/debug_toolbar/panels/staticfiles.html new file mode 100644 index 0000000..e405a25 --- /dev/null +++ b/debug_toolbar/templates/debug_toolbar/panels/staticfiles.html @@ -0,0 +1,57 @@ +{% load i18n %} +{% load static from staticfiles%} + +<h4>{% blocktrans count staticfiles_dirs|length as dirs_count %}Static file path{% plural %}Static file paths{% endblocktrans %}</h4> +{% if staticfiles_dirs %} +    <ol> +    {% for staticfiles_dir in staticfiles_dirs %} +        <li>{{ staticfiles_dir }}</li> +    {% endfor %} +    </ol> +{% else %} +    <p>{% trans "None" %}</p> +{% endif %} + +<h4>{% blocktrans count staticfiles_apps|length as apps_count %}Static file app{% plural %}Static file apps{% endblocktrans %}</h4> +{% if staticfiles_apps %} +    <ol> +    {% for static_app in staticfiles_apps %} +        <li>{{ static_app }}</li> +    {% endfor %} +    </ol> +{% else %} +    <p>{% trans "None" %}</p> +{% endif %} + +<h4>{% blocktrans count staticfiles|length as staticfiles_count %}Static file{% plural %}Static files{% endblocktrans %}</h4> +{% if staticfiles %} +<dl> +{% for staticfile in staticfiles %} +    <dt><strong><a class="toggleTemplate" href="{{ staticfile.url }}">{{ staticfile }}</a></strong></dt> +    <dd><samp>{{ staticfile.real_path }}</samp></dd> +{% endfor %} +</dl> +{% else %} +    <p>{% trans "None" %}</p> +{% endif %} + + +{% for finder, payload in staticfiles_finders.items %} +<h4>{{ finder }} ({{ payload|length }} files)</h4> +<table> +    <thead> +        <tr> +            <th>{% trans 'Path' %}</th> +            <th>{% trans 'Location' %}</th> +        </tr> +    </thead> +    <tbody> +    {% for path, real_path in payload %} +    <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}"> +        <td>{{ path }}</td> +        <td>{{ real_path }}</td> +    </tr> +    {% endfor %} +    </tbody> +</table> +{% endfor %}  | 
