Задать вопрос

Тел: +7 965 3737 888

458

Просмотров

1

Ответов

Variable inspect filter

<p>This module has two template filters allowing you to dump any template variable. Special handling for object instances. Pretty output.
</p>
<p>Usage:
       {% load dumper %}
       ...
       &lt;pre&gt;{{ var|rawdump }}&lt;/pre&gt;
   or
       {% load dumper %}
       ...
       {{ var2|dump }}
</p>
<p>How to install:
   As usual, put into &lt;your-proj&gt;/&lt;any-app&gt;/templatetags/dumper.py.
</p>

Вопрос полезен? Да0/Нет0
file_3646.py(750.0б)
None

Ответы (1):

Ответrozza:07.05.2008
Ответ полезен? Да0/Нет0

Nice snippet - only change I would add is a check in to ensure that TEMPLATE_DEBUG is True