+ -
当前位置:首页 → 问答吧 → django中的if标签问题

django中的if标签问题

时间:2011-03-08

来源:互联网

本帖最后由 eeeee159963 于 2011-03-10 13:02 编辑

这是django教程中的一个例子:
{% if not athlete_list or coach_list %}
    There are no athletes or there are some coaches.
{% endif %}

其中,根据"There are no athletes or there are some coaches."这句话的意思,它的运算符优先级是先not后or,可是在python中应该是先or后not,是不是在django的模板中和python不一样?

作者: eeeee159963   发布时间: 2011-03-08

没人回答吗

作者: eeeee159963   发布时间: 2011-03-10