title: django extending User with UserProfile: User has no userprofile
body: <p>I have a UserProfile class set up, and I have created a user with user profile via the Django admin console, but I cannot seem to access the userprofile from my view. The error is: RelatedObjectDoesNotExist at /mcadb/
  User has no userprofile. Any thoughts on what I'm missing here?  I've looked at examples and I can't see it. When I load the view, the error seems to be at the test = user.userprofile view. Thank you.</p>
  
  <p>models.py</p>
  
  <pre><code>class UserProfile(models.Model):
       my_id = models.CharField(max_length=8)
       user = models.OneToOneField(User)
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>from django.contrib.auth.models import User
  from .models import UserProfile
  
  @login_required
  def index(request):
      user = request.user
      test = user.userprofile
  </code></pre>