鉴于我有两个变量{{ profile }},其值为"test",另一个{{ element.author }}值为"test".在jinja2中,当我尝试使用if比较它们时,没有任何显示.我做的比较如下:
{% if profile == element.author %}
{{ profile }} and {{ element.author }} are same
{% else %}
{{ profile }} and {{ element.author }} are **not** same
{% endif %}
Run Code Online (Sandbox Code Playgroud)
我得到输出test and test are not same什么是错的,我怎么比较?