Anpassungen für das Hosting bei Djangoeurope und damit verbundenen Versionen Django 1.8 und Python 2.7
This commit is contained in:
committed by
Christian Berg
parent
cb4b15b3c6
commit
b96b485b61
46
templates/debug_toolbar/panels/templates.html
Normal file
46
templates/debug_toolbar/panels/templates.html
Normal file
@@ -0,0 +1,46 @@
|
||||
{% load i18n %}{% load static from staticfiles %}
|
||||
<h4>{% blocktrans count template_dirs|length as template_count %}Template path{% plural %}Template paths{% endblocktrans %}</h4>
|
||||
{% if template_dirs %}
|
||||
<ol>
|
||||
{% for template in template_dirs %}
|
||||
<li>{{ template }}</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% else %}
|
||||
<p>{% trans "None" %}</p>
|
||||
{% endif %}
|
||||
|
||||
<h4>{% blocktrans count templates|length as template_count %}Template{% plural %}Templates{% endblocktrans %}</h4>
|
||||
{% if templates %}
|
||||
<dl>
|
||||
{% for template in templates %}
|
||||
<dt><strong><a class="remoteCall toggleTemplate" href="{% url 'djdt:template_source' %}?template={{ template.template.name }}">{{ template.template.name|addslashes }}</a></strong></dt>
|
||||
<dd><samp>{{ template.template.origin_name|addslashes }}</samp></dd>
|
||||
{% if template.context %}
|
||||
<dd>
|
||||
<div class="djTemplateShowContextDiv"><a class="djTemplateShowContext"><span class="toggleArrow">▶</span> {% trans "Toggle context" %}</a></div>
|
||||
<div class="djTemplateHideContextDiv" hidden="hidden"><code>{{ template.context }}</code></div>
|
||||
</dd>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% else %}
|
||||
<p>{% trans "None" %}</p>
|
||||
{% endif %}
|
||||
|
||||
<h4>{% blocktrans count context_processors|length as context_processors_count %}Context processor{% plural %}Context processors{% endblocktrans %}</h4>
|
||||
{% if context_processors %}
|
||||
<dl>
|
||||
{% for key, value in context_processors.items %}
|
||||
<dt><strong>{{ key|escape }}</strong></dt>
|
||||
<dd>
|
||||
<div class="djTemplateShowContextDiv"><a class="djTemplateShowContext"><span class="toggleArrow">▶</span> {% trans "Toggle context" %}</a></div>
|
||||
<div class="djTemplateHideContextDiv" hidden="hidden"><code>{{ value|escape }}</code></div>
|
||||
</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% else %}
|
||||
<p>{% trans "None" %}</p>
|
||||
{% endif %}
|
||||
|
||||
<script src="{% static 'debug_toolbar/js/toolbar.template.js' %}"></script>
|
||||
Reference in New Issue
Block a user