title: Django, Error: UserProfile matching query does not exist
body: <p>I am learning django. Right now, I need to create a Userprofile.</p>
  
  <p>I already created the model which is </p>
  
  <pre><code>class UserProfile(models.Model):  
  user = models.OneToOneField(User)  
  active = models.BooleanField()
  address = models.CharField('Shipping address', max_length=150, blank=True, null=True)
  telephone = models.CharField('Telephone number for shipping', max_length=20, blank=True, null=True)
  steps = models.DecimalField('Steps since creation', max_digits=100, decimal_places=2, null=True)
  active = models.BooleanField()
  
  def __str__(self):  
      return "%s's profile" % self.user  
  </code></pre>
  
  <p>inside an application called accounting. I already created </p>
  
  <pre><code>def create_user_profile(sender, **kwargs):
  #When creating a new user, make a profile for him or her.
  u = kwargs["instance"]
  if not UserProfile.objects.filter(user=u):
      UserProfile(user=u).save()
  </code></pre>
  
  <p>post_save.connect(create_user_profile, sender=User)</p>
  
  <p>So every time a user is created, a profile created automatically. I've already created and verified that the user was created in userprofile table. I also went the shell. I looked for that user which ID is 4. I printed adress for User 4 and I got the address. So I am sure they are linked and working. But when I go to the HTML, i get the error.</p>
  
  <p>Here is the View. </p>
  
  <pre><code>    from accounting.models import UserProfile, Charge, Wallet
  from django.shortcuts import get_object_or_404, RequestContext
  from django.shortcuts import render_to_response
  from django.http import HttpResponse
  from django.template import Context, loader
  from django.contrib.auth.forms import UserCreationForm
  
  #def userprofile(request, user_id):
  def userprofile(request, user_id):
  
  
  user_profile = request.user.get_profile()
  active = user_profile.active
  return render_to_response('accounting/templates/userprofile.html', {
      'user_profile': user_profile,   
      'active': active,
  }, context_instance=RequestContext(request))
  </code></pre>
  
  <p>Thanks.</p>