Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » _pre_save and _post_save for "set_thingie" methods [RSS Feed]

#1 Nov. 24, 2005 10:21:31

Andreas S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

_pre_save and _post_save for "set_thingie" methods


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

Offline

#2 Nov. 25, 2005 00:32:30

Adrian H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

_pre_save and _post_save for "set_thingie" methods


On 11/24/05, Andreas Stuhlmüller <> wrote:
> 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?

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

Offline

#3 Nov. 25, 2005 06:55:02

Andreas S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

_pre_save and _post_save for "set_thingie" methods


On 11/25/05, Adrian Holovaty <> 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 athttp://code.djangoproject.com/ticket/905.

Andreas

Offline

  • Root
  • » Django
  • » _pre_save and _post_save for "set_thingie" methods [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of January
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support