1👍
Apart from using models.EmailField (which you should be doing) you need to change {{ contactform.errors }}
to {{ contactform.email.errors }}
1👍
I figured it out. Before the validation error could even be raised, I was attempting to generate a brand new form.
contactform = ContactForm()
^That code in my views.py file would make it so an entirely new form was created on my HTML template. Once I got rid of it, everything worked like it should.
👤Will
- [Answered ]-Django Will Not Pull CSS Static File (404 Error) Even Though File Paths Look Correct
- [Answered ]-How does Django RESTful Framework get user model from token from HTTP header?
- [Answered ]-Django app view – how to get an entry from the django database in the url and to obtain more information from the database for the view?
- [Answered ]-Json recognised as String
- [Answered ]-Django unexpected IntegrityError with PostgreSQL
Source:stackexchange.com