old_contents: from django.db import models
  from django.contrib.auth.models import User
  
  
  class Profile(models.Model):
      user = models.OneToOneField(User)
  
      def __str__(self):
          return self.user.get_full_name() or self.user.username
  
new_contents: from django.db import models
  from django.db.models.signals import post_save
  from django.contrib.auth.models import User
  
  
  class Profile(models.Model):
      user = models.OneToOneField(User)
  
      def __str__(self):
          return self.user.get_full_name() or self.user.username
  
  
  def create_user_profile(sender, instance, created, **kwargs):
      if created:
          Profile.objects.create(user=instance)
  
  
  post_save.connect(create_user_profile, sender=User)
subject: Create profile if user is created