title: Why post_save signal is not working here?
body: <p>I created a signal that creates profile when a user is created. Previously, the same code was working fine in other projects. Here, I don't know what I am doing wrong that it doesn't work and doesn't create profile for created users. This is the signal. </p>
  
  <pre><code>@receiver(post_save, sender=User)
  def create_profile(sender, instance, created, **kwargs):
      print(instance)
      if created:
          Profile.objects.create(user=instance)
  
  
  @receiver(post_save, sender=User)
  def save_profile(sender, instance, **kwargs):
      instance.profile.save()
  </code></pre>
  
  <p>All the imports are done properly, and here I imported that in my app:</p>
  
  <pre><code>class UsersConfig(AppConfig):
      name = 'users'
  
      def ready(self):
          import users.signals
  </code></pre>
  
  <p>In case if you want to look at profile model:</p>
  
  <pre><code>class Profile(models.Model):
      user = models.OneToOneField(User, on_delete=models.CASCADE)
      image = models.ImageField(default='default.jpg', upload_to='profile_pics')
  
      def __str__(self):
          return "{} Profile".format(self.user.username)
  </code></pre>
  
  <p>Since I created a signal, for all new created users it should add that <code>default.jpg</code> as default profile picture. </p>
  
  <p>But if I create a new user, login then go to profile page it shows something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/lQDO1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lQDO1.png" alt="enter image description here"></a></p>
  
  <p>and if I go to admin and add this profile picture manually it works fine. One final thing I added the following settings in <code>urls.py</code> as well:</p>
  
  <pre><code>if settings.DEBUG:
      urlpatterns += static(settings.MEDIA_URL,
                            document_root=settings.MEDIA_ROOT)
  </code></pre>
  
  <p>Please help me fix it, it has been 3 hours I tried all possible ways but couldn't make it work. Thank you for your help.</p>
  
  <p>edit: 
  <code>template</code></p>
  
  <pre><code>&lt;div class="media"&gt;
      &lt;img class="rounded-circle account-img" src="{{ user.profile.image.url }}"&gt;
      &lt;div class="media-body"&gt;
          &lt;h2 class="account-heading"&gt;{{ user.username }}&lt;/h2&gt;
          &lt;p class="text-secondary"&gt;{{ user.email }}&lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>edit-2: <code>default.jpg</code> is added here!
  <a href="https://i.stack.imgur.com/vpVX8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vpVX8.png" alt="enter image description here"></a></p>