title: how to map user model to customer model in django
body: <p>I was working on an e-commerce website using Django for which I created a customer model in <code>models.py</code></p>
  <pre><code>class Customer(models.Model):
      user = models.OneToOneField(User, null=True, blank=True, on_delete=models.CASCADE)
      name = models.CharField(max_length=200, null=True)
      email = models.CharField(max_length=200)
  
      def __str__(self):
          return self.name
  </code></pre>
  <p>and when I register a new user on my site using this view:</p>
  <pre><code>def signup(request):
      if request.method == 'POST':
          form = SignUpForm(request.POST)
          if form.is_valid():
              form.save()
              username = form.cleaned_data.get('username')
              raw_password = form.cleaned_data.get('password1')
              user = authenticate(username=username, password=raw_password)
              login(request, user)
              return redirect('store')
  
      else:
          form = SignUpForm()
      return render(request, 'store/signup.html', {'form': form})
  </code></pre>
  <p>The user gets created but I get the error <code>RelatedObjectDoesNotExist: User has no Customer</code>
  I know it's because the User model is created but not Customer, I'm new to Django and want to know a way to map these two models at the time of registration.</p>