📜  djangio 模板中的 if 条件 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:05.670000             🧑  作者: Mango

代码示例1
{% if athlete_list %}
    Number of athletes: {{ athlete_list|length }}
{% elif athlete_in_locker_room_list %}
    Athletes should be out of the locker room soon!
{% else %}
    No athletes.
{% endif %}