Re: Display the form errors in the django template with ajax post

2015-12-29 Thread Luis Zárate
I do it like this create a form template (for abbreviation I will use {{form}} form_template.html > {{form}} > in include form_template.html public_contact.html > > > {% include 'form_template.html' %} > > and in the ajax response from django.template.loader import render_to_string e

Display the form errors in the django template with ajax post

2015-12-24 Thread Robin Lery
I have a contact form through which users would be able to contact me. I am using django with ajax, and it works fine *if* there's no error. I would like to show the errors if there's any like it displays above the input fields and not just the errors, but both the input and the errors. It does how