title: Django FileField with upload_to determined at runtime
body: <p>I'm trying to set up my uploads so that if user joe uploads a file it goes to MEDIA_ROOT/joe as opposed to having everyone's files go to MEDIA_ROOT. The problem is I don't know how to define this in the model. Here is how it currently looks:</p>
  
  <pre><code>class Content(models.Model):
      name = models.CharField(max_length=200)
      user = models.ForeignKey(User)
      file = models.FileField(upload_to='.')
  </code></pre>
  
  <p>So what I want is instead of '.' as the upload_to, have it be the user's name.</p>
  
  <p>I understand that as of Django 1.0 you can define your own function to handle the upload_to but that function has no idea of who the user will be either so I'm a bit lost.</p>
  
  <p>Thanks for the help!</p>