title: cannot auto create profile when registered new user from link
body: <h1>Problem :</h1>
  
  <p>user's profile hasn't be created through "Sign Up" link(new user register) but able to created in only admin page.</p>
  
  <h1>view.py</h1>
  
  <pre><code>from django.shortcuts import render, redirect
  from django.contrib import messages
  from .forms import UserRegisterForm, UserUpdateForm, ProfileUpdateForm
  from django.contrib.auth.decorators import login_required
  
  def register_view(request):
      if request.method == 'POST':
          form = UserRegisterForm(request.POST)
          if form.is_valid():
              form.save()
              username = form.cleaned_data.get('username')
              messages.success(request, f'Your account has been created!!!')
              return redirect('login')
      else:
          form = UserRegisterForm()
      return render(request, 'users/register_users.html', {'form': form})
  
  @login_required
  def profile(request):
      if request.method == 'POST':
          u_form = UserUpdateForm(request.POST, instance=request.user)
          p_form = ProfileUpdateForm(request.POST,
                                     request.FILES,
                                     instance=request.user.profile)
          if u_form.is_valid() and p_form.is_valid():
              u_form.save()
              p_form.save()
              messages.success(request, f'Your account has been updated!!!')
              return redirect('profile')
      else:
          u_form = UserUpdateForm(instance=request.user)
          p_form = ProfileUpdateForm(instance=request.user.profile)
  
      context = {
      'u_form': u_form,
      'p_form': p_form
      }
  
      return render(request, 'users/profile_users.html',context)
  </code></pre>
  
  <h1>model.py</h1>
  
  <pre><code>from django.db import models
  from django.contrib.auth.models import User
  
  
  class Profile(models.Model):
      user = models.OneToOneField(User, on_delete=models.CASCADE)
      image = models.ImageField(default='abc.jpg', upload_to='profile_pics')
  
      def __str__(self):
          return f'{self.user.username} Profile'
  
      def save(self, *args, **kwargs):
          super().save(*args, **kwargs)
  </code></pre>
  
  <h1>forms.py</h1>
  
  <pre><code>from django import forms
  from django.contrib.auth.models import User
  from django.contrib.auth.forms import UserCreationForm
  from .models import Profile
  
  
  class UserRegisterForm(UserCreationForm):
      email    = forms.EmailField(max_length=30)
  
      class Meta:
          model = User
          fields = [
          'username',
          'email',
          'password1',
          'password2',
          ]
  
  class UserUpdateForm(forms.ModelForm):
      email    = forms.EmailField(max_length=30)
  
      class Meta:
          model = User
          fields = [
          'username',
          'email']
  
  class ProfileUpdateForm(forms.ModelForm):
      class Meta:
          model = Profile
          fields = ['image']
  </code></pre>
  
  <h1>signals.py</h1>
  
  <pre><code>from django.db.models.signals import post_save
  from django.contrib.auth.models import User
  from django.dispatch import receiver
  from .models import Profile
  
  @receiver(post_save, sender=User)
  def create_profile(sender, instance, created, **kwargs):
      if created:
          Profile.objects.create(user=instance)
  
  @receiver(post_save, sender=User)
  def save_profile(sender, instance, **kwargs):
      instance.profile.save()
  </code></pre>
  
  <h1>profile_users.html</h1>
  
  <pre><code>{% extends 'postorder/base.html' %}
  {% load crispy_forms_tags %}
  {% block content %}
  &lt;div class="content-section"&gt;
    &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;
  　　&lt;form method="POST" enctype="multipart/form-data"&gt;
          {% csrf_token %}
          &lt;fieldset class="form-group"&gt;
              &lt;legend class="border-bottom mb-4"&gt;Profile info!&lt;/legend&gt;
              {{ u_form|crispy }}
              {{ p_form|crispy }}
          &lt;/fieldset&gt;
          &lt;div class="form-group"&gt;
              &lt;button class="btn btn-outline-info" type="submit"&gt;Update!&lt;/button&gt;
          &lt;/div&gt;
  　&lt;/form&gt;
  &lt;/div&gt;
  {% endblock content %}
  </code></pre>
  
  <h1>register_users.html</h1>
  
  <pre><code>{% extends 'postorder/base_postorder.html' %}
  {% load crispy_forms_tags %}
  {% block content %}
      &lt;div class="content-section"&gt;
          &lt;form method="POST"&gt;
              {% csrf_token %}
              &lt;fieldset class="form-group"&gt;
                  &lt;legend class="border-bottom mb-4"&gt;SUBMIT NOW!&lt;/legend&gt;
                  {{ form|crispy }}
              &lt;/fieldset&gt;
              &lt;div class="form-group"&gt;
                  &lt;button class="btn btn-outline-info" type="submit"&gt;Sign Up!&lt;/button&gt;
              &lt;/div&gt;
          &lt;/form&gt;
          &lt;div class="border-top pt-3"&gt;
              &lt;small class="text-muted"&gt;
                  ALready Have an Account? &lt;a class="ml-2" href="{% url 'login' %}"&gt;Sign In!&lt;/a&gt;
              &lt;/small&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  {% endblock content %}
  </code></pre>
  
  <ul>
  <li>app.py applied signal</li>
  </ul>
  
  <p>What 's wrong with the code?
  Apologize in advance for long code as newbie don't know where is the problem since different approach accumulated.</p>
  
  <ul>
  <li>followed by this video : <a href="https://www.youtube.com/watch?v=q4jPR-M0TAQ&amp;t=2292s&amp;list=WL&amp;index=6" rel="nofollow noreferrer">https://www.youtube.com/watch?v=q4jPR-M0TAQ&amp;t=2292s&amp;list=WL&amp;index=6</a></li>
  </ul>