Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图为此找到答案,但对我来说这是不可能的(文档,stackoverflow ...)。
我有一个只有两个字段的动态表单,URL 和密码。还有一个按钮可以添加两个字段的更多行。
http://imgur.com/bdKM6
例如,我只想为表单集顶部的所有字段显示一个错误。可能吗?非常感谢。
你有没有尝试过:
<ul> {% for error in form.errors %} <li>{{ error }}</li> {% endfor %} </ul>