model_instance = form.save(commit=False)
will return you a object of the model without saving to the DB
you can then add value of some field which is not available on form
model_instance.some_field = value
model_instance.save()
Also:
model_instance = form.instance
# edit
model_instance.save()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With