title: variable can't be expression -- extending the user model in django
body: <p>I realize that there are much more elegant ways to do this, and I will get there, but this is just hacking around trying to make it all work first. I've gotten this error:</p>
  
  <blockquote>
    <p>SyntaxError at <code>/accounts/profile/foobar/</code><br>
    keyword can't be an expression (views.py, line 104)</p>
  </blockquote>
  
  <p>and here is the corresponding line. Note: keyword is a string that I pass in the URL and I use it to look up the user. </p>
  
  <pre><code>user = User.objects.get(username=keyword)
  up = UserProfile(user=user.id,
                   fullname=result['fullname'],
                   email=result['email'],
                   phone=result['phone'],
                   title=result['title'],
                   department=result['department'],
                   office=result['office'])
  </code></pre>
  
  <p>Am I not mapping the <code>UserProfile</code> object to the <code>User</code> object correctly? What's the proper way to add in a foreign key -- simply pass the object itself? Insight and wisdom appreciated.</p>