开发者

In Django, how do I print out only the error, but not the key?

{{ docform.errors }}


__all__
Please type in the location of this submission.
title
Please write 开发者_运维知识库more in Title.

When I pass a form to the template and do the above..it prints out everything.

But I don't want the all or "title". I just want the error.


solved.

   {% for f in docform %}
        {{ f.errors }}
    {% endfor %}
    {{ docform.non_field_errors }}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜