Django Book 翻译
菜单>:
TOC
返回
原文:
It is only possible to compare an argument to template variables or strings. You cannot check for equality with Python objects such as ``True`` or ``False`` . If you need to test if something is true or false, use the ``if`` tag instead.
翻译:
可以用来比较的参数只限于模板变量或者字符串(实际上整数和小数也是可以的——译注),你不能检查诸如 ``True`` or ``False`` 等Python对象是否相等。如果你需要测试某值的真假,可以用 ``if`` 标签。
备注:
译者: