内置测试清单
2020-07-31 15:17 更新
{% if variable is defined %}
value of variable: {{ variable }}
{% else %}
variable is not defined
{% endif %}
divisibleby(值, num)检查变量是否可被数字除除
float(价值)如果对象是浮点,则返回 true。
版本 2.11 中的新版本。
lower(价值)如果变量已降低,则返回 true。
sameas(值,其他)检查对象是否指向与另一个对象相同的内存地址:
{% if foo.attribute is sameas false %} the foo attribute really is the `False` singleton {% endif %}
string(价值)如果对象是字符串,则返回 true。
undefined(价值)喜欢
定义()但相反。
upper(价值)如果变量已上加,则返回 true。
以上内容是否对您有帮助:
← 内置过滤器清单

免费 AI IDE


更多建议: