I am currently using django CreateView to publish data to a database. Unfortunately, the method in which I would like to save and execute user logic, form_valid () is never called. I read in another answer about stack overflows that form_invalid () might solve the problem, but I can't get this method to call either. The only method that seems to call is get (), which I overridden and inserted the print statement. What am I doing wrong?
class declaration in view.py
class TeamCreate(CreateView):
corresponding template code
{% block content %} <form action="" method='POST'> {% csrf_token %} {{ form|crispy }} <input class="btn btn-primary" type="submit" value="Create" /> </form>
source share