A
A
Andrey Salnikov2017-04-27 09:14:31
Django
Andrey Salnikov, 2017-04-27 09:14:31

How to make a contact form in Django?

There is a contact form on every page of the website. It is created through the inclusion_tag. But how to process it?
First I did it in the same inclusion_tag, but I found out that it cannot redirect to the page with the inscription - sent successfully, because cannot return a Response.
The second idea is to make the action of the form tag on the url - /mail. And there in the view to process it.
The question is. If is_valid returns false, how do I go back to the old page and print errors to the form?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question