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

Тел: +7 965 3737 888

442

Просмотров

0

Ответов

simple string formatting filter

<p>I use this filter quite a bit to keep my templates less cluttered.  Instead of:</p>
{%if some_variable%}, {{some_variable}}{%endif%}

<p>I can write:</p>
{{some_variable|format:", %s"}}

<p>A common one I use is:</p>
{{some_variable|format:"&lt;p&gt;%s&lt;/p&gt;"}}

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