There is 'post_save' signal with 'created' parameter. But,
unfortunately, this feature is undocumented...


On Jan 31, 6:44 am, Julien <[EMAIL PROTECTED]> wrote:
> Hello there,
>
> Does the title says it all? When overriding the save method of an
> object, I'd like to know if that object is being created or updated.
>
> How I do it so far is:
>
> def save(self):
>     if self.pk:
>         ...=> being created
>     else:
>         ...=> being updated
>
> I vaguely remember seeing a parameter for the save method which would
> do that, but I can't find it. Any thoughts?
>
> Thanks!
>
> Julien
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to