Ticket #10284: modelformset_doc.diff
File modelformset_doc.diff, 763 bytes (added by , 14 years ago) |
---|
-
docs/topics/forms/modelforms.txt
654 654 need to call ``formset.save_m2m()`` to ensure the many-to-many relationships 655 655 are saved properly. 656 656 657 If you pass ``can_delete=True`` to the ``modelformset_factory``, and you save 658 with ``commit=False``, you need to call delete on each of the 659 ``formset.deleted_objects`` to actually delete them:: 660 661 # really delete instances 662 >>> instances = formset.save(commit=False) 663 >>> for obj in formset.deleted_objects: 664 ... obj.delete() 665 657 666 .. _model-formsets-max-num: 658 667 659 668 Limiting the number of editable objects