diff options
| author | abhiabhi94 <13880786+abhiabhi94@users.noreply.github.com> | 2021-07-23 14:13:19 +0530 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-07-26 08:50:40 +0200 |
| commit | bdd4cbe84a4f89b114e614042a9e7f280c0ced63 (patch) | |
| tree | 02d37a40effef7498bea1cea87db07c3ae2b3113 | |
| parent | b2f7b53facc7c3432b9d6173276f4baff02e71b7 (diff) | |
[3.2.x] Fixed #32957 -- Improved visibility of arguments sections in Model.save() docs.
Backport of f876c7d08e75d719df5cd34b97cac63fdaae3fcc from main
| -rw-r--r-- | docs/ref/models/instances.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt index 23b4bc63ab..8fe6cf0516 100644 --- a/docs/ref/models/instances.txt +++ b/docs/ref/models/instances.txt @@ -355,6 +355,10 @@ To save an object back to the database, call ``save()``: .. method:: Model.save(force_insert=False, force_update=False, using=DEFAULT_DB_ALIAS, update_fields=None) +For details on using the ``force_insert`` and ``force_update`` arguments, see +:ref:`ref-models-force-insert`. Details about the ``update_fields`` argument +can be found in the :ref:`ref-models-update-fields` section. + If you want customized saving behavior, you can override this ``save()`` method. See :ref:`overriding-model-methods` for more details. @@ -549,6 +553,8 @@ For more details, see the documentation on :class:`F expressions <django.db.models.F>` and their :ref:`use in update queries <topics-db-queries-update>`. +.. _ref-models-update-fields: + Specifying which fields to save ------------------------------- |
