From a53820b1b1747d6f9b5ee5723aa7526ededdaba7 Mon Sep 17 00:00:00 2001 From: Ben Spaulding Date: Wed, 11 Dec 2013 10:28:05 -0700 Subject: [PATCH] [1.5.x] Fixed #21594 -- Added note about model formsets deleting objects. This behavior has been fixed in 65e03a424e. refs #10284. Backport of de1d5d5df5 from stable/1.6.x. --- docs/topics/forms/modelforms.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt index 9fb5c1c0cb..7f9d12d5d7 100644 --- a/docs/topics/forms/modelforms.txt +++ b/docs/topics/forms/modelforms.txt @@ -711,6 +711,12 @@ to the database. If your formset contains a ``ManyToManyField``, you'll also need to call ``formset.save_m2m()`` to ensure the many-to-many relationships are saved properly. +.. note:: + + While calling ``formset.save(commit=False)`` does not save new or changed + objects to the database, it *does* delete objects that have been marked for + deletion. This behavior will be corrected in Django 1.7. + .. _model-formsets-max-num: Limiting the number of editable objects