标签:
1 @receiver(post_save, sender=User) 2 def create_account(sender, instance=None, **kwargs): 3 if instance is None: 4 return 5 ytuser, created = YTUser.objects.get_or_create(user=instance)
django signal
原文地址:http://www.cnblogs.com/tk091/p/4269394.html