title: Registering Different types of Users in Django
body: <p>I wont be needing to write codes much,I just need an idea.I am trying to make users in two different categories.That is a User can either have a Profile or Shop both not both.</p>
  
  <pre><code>class Profile(models.Model):
      user=models.OneToOneField(User,on_delete=models.CASCADE,primary_key=True,editable=True)
  
  class Shop(models.Model):
      user=models.OneToOneField(User,on_delete=models.CASCADE,primary_key=True,editable=True)
  </code></pre>
  
  <p>I want all users to either have one of both,They will register with the same form without being able to switch from one to another once they have registered for it.As at now what I'm doing is If i dont want a shop-owned User to have the previlege of a profile i do </p>
  
  <pre><code>def post_product(request):
      try:
          if bool(request.user.profile)==False:
              .....
      except:
          pass
  </code></pre>
  
  <p>But I have to do this for all views that require previledges. I want something site-wide that i can put in settings or put at the view like <code>@login_required</code> .Please how can I go about this.Thanks</p>