title: Django Foreign key queries
body: <p>In the following model:</p>
  
  <pre><code>class header(models.Model):
      title = models.CharField(max_length = 255)
      created_by = models.CharField(max_length = 255)
  
      def __unicode__(self):
          return self.id()
  
  class criteria(models.Model):
      details =   models.CharField(max_length = 255)
      headerid = models.ForeignKey(header)
  
      def __unicode__(self):
          return self.id()
  
  class options(models.Model):
      opt_details =   models.CharField(max_length = 255)
      headerid = models.ForeignKey(header)
  
      def __unicode__(self):
          return self.id()
  </code></pre>
  
  <p>If there is a row in the database for table header as
          <code>Id=1,    title=value-mart  ,      createdby=CEO</code></p>
  
  <p>How do I query criteria and options tables to get all the values related to header table
   id=1</p>
  
  <p>Also can some one please suggest a good link for queries examples.   </p>