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 }}
精彩评论