title: Django request.user Not Resolving SimpleLazyObject
body: <p>I have a method in my Django app that uses a user ID to find an object.  This method is called via an AJAX call.  When logged in to a valid user account, no matter what I try, <code>request.user</code> evaluates as a <code>django.utils.functional.SimpleLazyObject</code> object and fails to retrieve the data I want (<em>SkillEntry matching query does not exist</em> when it absolutely does exist).  I tried the solution in <a href="https://stackoverflow.com/questions/11875737/django-filtering-drafts-by-user-causes-error/11876015#11876015">Django: Filtering drafts by user causes error</a> to no avail.</p>
  
  <p>How can I get user to refer to an actual instance of a user object?</p>
  
  <p>View code:</p>
  
  <pre><code>@login_required
  def skill_set(request, name):
      skill = Skill.objects.get(slug=name) # Found.
      level = 0
      user = request.user
      if request.method == 'POST':
          if user.is_authenticated():
              entry = SkillEntry.objects.get(user=user.pk, skill=skill) # Not found.
              entry.level = request.POST['level']
              entry.save()
              return HttpResponse(status=200)
      else:
          return HttpResponseForbidden()
  </code></pre>
  
  <p>JavaScript client-side code:</p>
  
  <pre><code>function setSkill(skill, value) {
    var req = new XMLHttpRequest();
    req.open("POST", "/skill/" + skill + "/set/", true);
    csrftoken = getCookie('csrftoken');
    req.setRequestHeader("X-CSRFToken", csrftoken);
    req.send('level=' + value);
    var elem = document.getElementById('level');
    elem.innerHTML = "My skill level is " + value + ".";
  }
  </code></pre>
  
  <p>Is there perhaps something I need to set in the request to maintain the session info?  I could swear I've done something like this successfully before on a much earlier version of Django.  I'm using 1.4.3.</p>
  
  <p>EDIT:</p>
  
  <p>Here are the model definitions in my models.py:</p>
  
  <pre><code>class Skill(models.Model):
      name = models.CharField(max_length=100)
      slug = models.CharField(max_length=100, blank=True)
      keywords = models.CharField(max_length=120, blank=True, help_text='List of additional keywords this skill should show up for in search')
      description = models.TextField(null=True, blank=True)
      parent = models.ForeignKey('Skill', null=True, blank=True, help_text='Parent skill.  Leave blank if this is a root category.')
  
      def save(self, *args, **kwargs):
          if not self.id:
              self.slug = slugify(self.name)
          super(Skill, self).save(*args, **kwargs)
  
      def __unicode__(self):
          return self.name
  
      class Meta:
          ordering = ('name',)
  
  class SkillEntry(models.Model):
      skill = models.ForeignKey('Skill')
      level = models.IntegerField()
      user = models.ForeignKey(User)
      last_updated = models.DateField(auto_now=True)
  
      class Meta:
          verbose_name_plural = 'Skill Entries'
          ordering = ('skill__name',)
  
      def __unicode__(self):
          return self.user.username + ' knows ' + self.skill.name + ' at level ' + str(self.level)
  </code></pre>