mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #4102 -- Allow update of specific fields in model.save()
Added the ability to update only part of the model's fields in model.save() by introducing a new kwarg "update_fields". Thanks to all the numerous reviewers and commenters in the ticket
This commit is contained in:
committed by
Anssi Kääriäinen
parent
25128856f5
commit
365853da01
@@ -33,6 +33,17 @@ version compatible with Python 2.6.
|
||||
What's new in Django 1.5
|
||||
========================
|
||||
|
||||
Support for saving a subset of model's fields
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The method :meth:`Model.save() <django.db.models.Model.save()>` has a new
|
||||
keyword argument ``update_fields``. By using this argument it is possible to
|
||||
save only a select list of model's fields. This can be useful for performance
|
||||
reasons or when trying to avoid overwriting concurrent changes.
|
||||
|
||||
See the :meth:`Model.save() <django.db.models.Model.save()>` documentation for
|
||||
more details.
|
||||
|
||||
Minor features
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user