How do I display the Django '__all__' form errors in the template?

后端 未结 2 989
慢半拍i
慢半拍i 2020-12-23 13:06

I have the following form code:

# forms.py
class SomeForm(forms.Form):
    hello = forms.CharField(max_length=40)
    world = forms.CharField(max_length=40)
         


        
相关标签:
2条回答
  • 2020-12-23 13:55

    {{ form.non_field_errors }} for errors related to form not field

    {{ form.password.errors }} for errors related to text-field like passoword in this case

    0 讨论(0)
  • 2020-12-23 13:56
    {{ form.non_field_errors }}
    
    0 讨论(0)
提交回复
热议问题