_pre_save and _post_save for "set_thingie" methods

0 views
Skip to first unread message

Andreas Stuhlmüller

unread,
Nov 24, 2005, 5:20:33 AM11/24/05
to django...@googlegroups.com
It looks like "set_thingie" methods for many-to-many related objects
(as well as "set_thingie_order" and "get_thingie_order" methods) don't
trigger _pre_save or _post_save. Of course that's how it should be --
but is there a recommended way to execute code before or after these
methods?

Andreas

Adrian Holovaty

unread,
Nov 24, 2005, 7:32:14 PM11/24/05
to django...@googlegroups.com
Correct -- the "set_thingie" methods don't trigger _pre_save() or
_post_save(). Right now there's no hook before or after these methods.
Would it work for you to put the pre- and post-saving logic in your
own code, or does it absolutely have to be part of Django itself?

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Andreas Stuhlmüller

unread,
Nov 25, 2005, 1:54:53 AM11/25/05
to django...@googlegroups.com
On 11/25/05, Adrian Holovaty <holo...@gmail.com> wrote:
> Would it work for you to put the pre- and post-saving logic in your
> own code, or does it absolutely have to be part of Django itself?

It would make things a lot easier if it was part of Django, but it
doesn't necessarily have to be part of the official version. If
anybody feels the same need, see the patch at
http://code.djangoproject.com/ticket/905.

Andreas
Reply all
Reply to author
Forward
0 new messages