Proposal: ModelForm.save() should implement force_insert and force_update, like Model.save()

13 views
Skip to first unread message

Richard Davies

unread,
Nov 3, 2008, 9:24:22 AM11/3/08
to Django developers
The title says it all!

[8267] added the ability to force an SQL insert (or force an update)
via a model's save() method.

I would like the same force_insert and force_update flags to be
supported in a modelform's save() method.

These flags enable better control over some edge cases - e.g.
force_insert will prevent overwriting existing data if the same
primary key has accidentally been specified.


I've previously opened ticket 8672 with a patch to add this feature.
It got pushed to post-1.0, so I'd now like it to get into 1.1. The
patch no longer cleanly applies against current trunk, but I will
update it if people agree...

Cheers,

Richard.
Reply all
Reply to author
Forward
0 new messages