Jeremy Dunck wrote: > On Nov 13, 2007 10:02 AM, James Bennett <[EMAIL PROTECTED]> wrote: >> Personally, I'm comfortable with documenting the fact that if >> Model.save() is never called, the pre_save and post_save signals will >> never fire (same is true of overridden __init__() and the post_init >> signal, and of overridden delete() and the pre_delete and post_delete >> signals). >> > > Oh, I do want to call Model.save, I just don't want post_save to fire > until MyModel.save is done. > > But Collin's point about just making a new signal is fair. > > I'm just concerned about composability (C inherits B inherits A), but > I can live without it for now. If we get model subclassing working, > then this will definitely be an issue, but I doubt it'll be the only > one to work through. ;-)
How about introducing pre_save and/or post_save methods. The signal firing happens in pre_save and post_save. You can override whatever you want - pre_save, save, or post_save depending on your needs. This would also allow you to disable the firing of signals by overriding pre/post_save with a no-op. Gary --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---