title: Django authentication with custom model User
body: <p>For my needs builtin model User is not enough... So I have my own model UserProfile and I want make authentication on site through this model (UserProfile does not inherit from User model and not related to it at all).</p>
  
  <p>My Model:</p>
  
  <pre><code>class UserProfile(models.Model):
      password = models.CharField(max_length = 40)
      email = models.EmailField(max_length = 72, unique = True)
  
      ## Add this so that you can use request.user.is_authenticated
      def is_authenticated(self): 
          return True
  </code></pre>
  
  <p>But builtin authentication uses model User.</p>
  
  <p><strong>So I want to understand how can I change that, so authentication use my model UserProfile with all auth features??</strong>?</p>
  
  <p>A good tutorial would be great!</p>
  
  <p>(Step by step in views, models and authentication)</p>
  
  <p>PS: I know I can store extra data in other model but I don't want that </p>