title: how to set foreign key during form completion (python/django)
body: <p>During form processing I'd like to be able to set a foreign key field on a model object without the user having to select the key from a dropdown.</p>
  
  <p>For instance:</p>
  
  <pre><code>#models.py
  class AAA(models.Model):
  
      some_field = models.TextField()
  
  class BBB(models.Model):
      another_field = models.TextField()
      key_field = models.ForeignKey('AAA')
  </code></pre>
  
  <p>The user will navigate from a view showing an instance of 'AAA' to a create_object style view that will create an instance of 'BBB' given a parameter referring to 'AAA'. The foreign key is set in code to point back to the 'AAA' instance.</p>
  
  <p>The django comments framework seems to do this but I can't figure out how.</p>
  
  <p>Any ideas? I'm sure it should be quite simple.</p>