Abstracted form to save an object--which save methods should I override?

Form_valid is the right place. If you look at the source, you’ll see that that’s where it’s calling form.save.

So yes, you can override that method - but without eventually calling super.

If I were doing this, my form_valid method would have something like this within it:

new_object = form.save(commit=False)
new_object.custom_field_1 = some_calculated_result()
new_object.custom_field_2 = 42
new_object.save()

(See the second example box in the save() method docs linked above.)

Ken

2 Likes