0
{{ docform.errors }}
__all__
Please type in the location of this submission.
title
Please write more in Title.
當我將表單傳遞給模板並執行上述操作時,它會打印出所有內容。在Django中,我該如何打印出只有錯誤,但不是關鍵?
但我不想全部或「標題」。 我只是想要這個錯誤。
{{ docform.errors }}
__all__
Please type in the location of this submission.
title
Please write more in Title.
當我將表單傳遞給模板並執行上述操作時,它會打印出所有內容。在Django中,我該如何打印出只有錯誤,但不是關鍵?
但我不想全部或「標題」。 我只是想要這個錯誤。
解決了。
{% for f in docform %}
{{ f.errors }}
{% endfor %}
{{ docform.non_field_errors }}