Django Book 翻译
菜单>:
TOC
返回
原文:
``{{ form.message.errors }}`` will display as a ``
`` if errors are present and a blank string if the field is valid (or the form is unbound). We can also treat ``form.message.errors`` as a Boolean or even iterate over it as a list, for example:
翻译:
``{{ form.message.errors }}`` 会在 ``
`` 里面显示,如果字段是合法的,或者form没有被绑定,就显示一个空字符串。我们还可以把 ``form.message.errors`` 当作一个布尔值或者当它是list在上面做迭代:
备注:
译者: