title: Django / Sqlite3 add a row for model with a foreign key
body: <p>I'm new to both Django and SQlite3. I have a model (Person), with a foreign key to (Person_Type):</p>
  
  <pre><code>class Person(models.Model):
      name = models.CharField(max_length=500)
      pers_type = models.ForeignKey(Person_Type)
  
      def __unicode__(self):
          return self.name
  
  class Person_Type(models.Model):
      pers_type = models.CharField(max_length=40)
  
      def __unicode__(self):
          return self.pers_type
  </code></pre>
  
  <p>I am trying to add entries to Person using the python manage.py shell.</p>
  
  <p>So far, I have tried:</p>
  
  <pre><code>import sqlite3
  from trials.models import *
  
  conn = sqlite3.connect('privy.db')
  print Person #this returns &lt;class 'privy.trials.models.Person'&gt;
  cur = conn.cursor()
  fields = ['name', 'pers_type']
  row = ['Adam', 'Appellant']
  Person.objects.create(**dict(zip(fields, row)))
  </code></pre>
  
  <p>But this returns an error: ValueError: Cannot assign "'Appellant'": "Person.pers_type" must be a "Person_Type" instance.</p>
  
  <p>The string "Appellant" is already being stored as one of the values in the "Person_Type.pers_type" table. What do I need to change to get this to reference the pers_type field?</p>
  
  <p>Happy to provide more details if needed. Thanks very much for your time.</p>