@receiver(post_save, sender=User)
def create_profile(sender, instance, created, **kwargs):
if created:
User.objects.create(user=instance)
@receiver(post_save, sender=User)
def save_profile(sender, instance, **kwargs):
instance.user.save()