Re: Differentiate addition or change during post_save signal

2007-04-04 Thread David Larlet
2007/4/4, Aidas Bendoraitis <[EMAIL PROTECTED]>: > > You can have a pre_save signal for adding property > instance._is_new=True if the instance has no id. And then to delete > that property in the post_save signal after checking it. Thanks for your answer, it's a bit complicated because I need to

Re: Differentiate addition or change during post_save signal

2007-04-04 Thread Aidas Bendoraitis
You can have a pre_save signal for adding property instance._is_new=True if the instance has no id. And then to delete that property in the post_save signal after checking it. Regards, Aidas Bendoraitis [aka Archatas] On 4/4/07, David Larlet <[EMAIL PROTECTED]> wrote: > > Hi, > > I'd like to k

Differentiate addition or change during post_save signal

2007-04-04 Thread David Larlet
Hi, I'd like to know if it's possible to make the difference between addition and change for the post_save signal. For the moment I use something like that: def log_modification(sender, instance, signal): try: print sender.objects.get(id=instance.id) LogEntry.objects.log_acti