📜  poset save @reciever created - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:25.548000             🧑  作者: Mango

代码示例1
@receiver(post_save, sender=User)
def create_profile(sender, instance, created, **kwargs):
    if created:
        Profile1.objects.create(customer=instance)