Re: Model Inheritance - And Signals

2008-11-07 Thread Vitaly Babiy
Thanks Alex that worked great. Vitaly Babiy On Fri, Nov 7, 2008 at 12:19 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Try to connection handler without `sender` specified. And filter needed > models inside it. > > def my_handler(sender, **kwargs): > if not isinstance(sender, CustomModel):

Re: Model Inheritance - And Signals

2008-11-07 Thread Alex Koshelev
Try to connection handler without `sender` specified. And filter needed models inside it. def my_handler(sender, **kwargs): if not isinstance(sender, CustomModel): return signals.pre_save.connect(my_handler) On Fri, Nov 7, 2008 at 20:03, Vitaly Babiy <[EMAIL PROTECTED]> wrote: > if

Model Inheritance - And Signals

2008-11-07 Thread Vitaly Babiy
if I define a model called CustomModel and I attach attach a pre_save signal to it. Is there any way to have that signal be called any time model that extends CustomModel is being saved has that method saved. I know i could do this by overriding the save method on CustomeModel but I was wondering