擅长:python、mysql、java
<p><code>{{ }}</code>告诉模板打印值,这在表达式中不起作用。相反,使用<code>{% set %}</code>模板标记,然后像在普通python代码中那样分配值。</p>
<pre><code>{% set testing = 'it worked' %}
{% set another = testing %}
{{ another }}
</code></pre>
<p>结果:</p>
<pre><code>it worked
</code></pre>