@receiver(models.signals.post_save, sender=Cars)
def auto_num_on_save(sender, instance, **kwargs):
if hasattr(instance, '_already_ran'):
return
....my code
instance._already_ran = True
instance.save()
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/529c9c29-7e38-4a73-a0b8-8f299a4c1073%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.