[Django]-How can I save only specific fields in Django?

8👍

update_fields is an argument to a model’s save() method, not to the form’s save() method.

You can use obj = form.save(commit=False) to get the model instance with the updated fields, then call obj.save(update_fields=...).

👤knbk

Leave a comment