【发布时间】:2021-08-09 11:54:37
【问题描述】:
我在玩 jinja 模板,突然发现 DateTime 字段比较有一些错误。然后尝试像这样简单的数字比较:
{% if (5+6) > 1 %}
<p> This will display if the condition is true </p>
{% endif %}
但它说错误(对于这个 if 条件):
TemplateSyntaxError at /examevent/
Could not parse the remainder: '(5+6)' from '(5+6)'
为什么会发生,如何解决?
【问题讨论】: