title: Setting up two different types of Users in Django 1.5/1.6
body: <p><em>Please note--this is an updated version of <a href="https://stackoverflow.com/questions/12926922/how-to-set-up-django-models-with-two-types-of-users-with-very-different-attribut">my original question</a> on this subject, but deserves to be asked again with the change in how Django deals with users and authentication.</em></p>
  
  <p>I'm working on a website with two very different kinds of users--let's call them <code>Customers</code> and <code>Store Owners</code>.  Both register on the site, but have very different functionality.  <code>Customers</code> simply have a single profile and can shop among the stores that they like.  <code>Store Owners</code> have a single account but can have access to multiple stores, and each store can have multiple <code>Store Owners</code>.</p>
  
  <p>The exact details of the models don't matter, but the two types of users would require very different fields.  The models ideally would look something like this:</p>
  
  <pre><code>Customer
    email (username)
    password
    name
    address
    time_zone
    preferred_shipping
    favorite_stores (many-to-many field)
    ...
  
  Store Owner
    email (username)
    password
    name
    balance
    stores_owned (many-to-many field on Stores)
    stores_managed (many-to-many field on Stores)
    ...
  </code></pre>
  
  <p>Originally, when Django had poor custom user support, I had a <code>UserProfile</code> class with some additional fields with a <code>OneToOne</code> on <code>User</code>, and then additional <code>Customer</code> and <code>StoreOwner</code> classes that were <code>OneToOne</code> on <code>UserProfile</code>.  This didn't work very well.</p>
  
  <p>Given the changes in Django 1.5/1.6, I'm trying to come up with the best way to structure this.  Right now, I have the following:</p>
  
  <pre><code>class CustomerUser(AbstractBaseUser):
      ...
  
  class StoreOwnerUser(AbstractBaseUser):
      ...
  </code></pre>
  
  <p>But because there would be two types of user, I can't set <code>AUTH_USER_MODEL</code> to only one of them.</p>
  
  <p><strong>What is the best way to structure this so that I can have two different types of users with different fields, without causing me any problems in user authentication, user creation, or the admin?</strong></p>
  
  <p>Also, how will I be able to tell from login alone whether this user is a <code>CustomerUser</code> or a <code>StoreOwnerUser</code>?</p>