title: 'User' object has no attribute 'UserProfile'
body: <p>I tried following the example at <a href="https://docs.djangoproject.com/en/1.9/topics/auth/customizing/#extending-the-existing-user-model" rel="noreferrer">https://docs.djangoproject.com/en/1.9/topics/auth/customizing/#extending-the-existing-user-model</a> on how to extend the user model. But I cannot retrieve the model data which I attached to the User. </p>
  
  <p>model</p>
  
  <pre><code>from django.db import models
  from django.contrib.auth.models import User
  from django.db.models.signals import post_save
  
  class UserProfile(models.Model):
      user = models.OneToOneField(User, on_delete=models.CASCADE)
      ip = models.IntegerField(default=0)
  
  def create_user_profile(sender, instance, created, **kwargs):
      if created:
          UserProfile.objects.create(user=instance)
  
  post_save.connect(create_user_profile, sender=User)
  </code></pre>
  
  <p>getting my User object </p>
  
  <pre><code>user = auth.authenticate(username=username, password=password)
  g = user.UserProfile.ip
  print(g)
  </code></pre>
  
  <p>The user gets fetched properly, and I'm able to get all the data that are with the standard user. But user.UserProfile will result in:</p>
  
  <pre><code>Internal Server Error: /Crowd/login/
  Traceback (most recent call last):
    File "C:\Anaconda3\Lib\site-packages\django\core\handlers\base.py", line 149, in get_response
      response = self.process_exception_by_middleware(e, request)
    File "C:\Anaconda3\Lib\site-packages\django\core\handlers\base.py", line 147, in get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "C:\Users\Rasmus\workspace\Crowd\src\Cr\views.py", line 35, in login
      g = user.UserProfile.ip
  AttributeError: 'User' object has no attribute 'UserProfile'
  [05/Sep/2016 04:32:46] "POST /Crowd/login/ HTTP/1.1" 500 69185
  </code></pre>
  
  <p>I checked my database and I can see that there's a row in UserProfile which has a relation with User. So UserProfile is getting created properly(I assume). </p>