[Answer]-What method creates the object in a Django class-based CreateView?

1👍

CreateView inherits from ModelFormMixin. Override the form_valid method to change the behaviour when the form is valid.

You can see the code for the form_valid method on GitHub. The default behaviour is described in the docs as:

form_valid(form)
Saves the form instance, sets the current object for the view, and redirects to get_success_url().

Leave a comment