Django Book 翻译
菜单>:
TOC
返回
原文:
The use of parentheses for controlling order of operations is not supported. If you find yourself needing parentheses, consider performing logic in the view code in order to simplify the templates. Even so, if you need to combine ``and`` and ``or`` to do advanced logic, just use nested ``{% if %}`` tags, for example:
翻译:
系统不支持用圆括号来组合比较操作。如果你发现需要组合操作,你可以考虑用逻辑语句来简化 模板的处理。例如,你需要组合 ``and`` 和 ``or`` 做些复杂逻辑判断,可以使用嵌套的 ``{% if %}`` 标签,示例如下:
备注:
译者: