{{title}}
Suite
Status
{% for n in list %}
{{ n['suite'] }}
Status
{% for i in n['suitecase'] %}
{% for a in i %}
{{ a['tag'] }}--{{ a['action'] }}--{{ a['element'] }}
{% if "success" in a['status'] %}
Pass
{% elif "info" in a['status'] %}
Skip
{% elif "danger" in a['status']%}
Fail
{% else %}
Error
{% endif %}
{% if "success" not in a['status'] %}
 
{% endif %}
{% if "success" not in a['status'] %}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
Total Test Runned:{{total_test}}
将这个前端模板渲染,提示这个错误
jinja2.exceptions.TemplateSyntaxError: Unexpected end of template. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'.
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
for 总共四个,endfor总共三个,所以楼主应该写少一个endfor吧,所以导致语法错误!