我想申請,如果條件內{%塊含量%}通過使用下面的代碼:如何使用,如果條件在Django內{塊含量%}
{% for item in execution_log %}
{% if item.description == 'Set On' %}
#Condition
{% elseif item.description == 'Set Off' %}
#Condition
{% elseif item.description == 'FFMPEG error' %}
#Condition
{% endif %}
{% endfor %}
但我沒有得到任何輸出。 if條件的語法是否正確?
{{item.description}}在模板中顯示什麼? – Exprator