title: Django Query using Foreign Key
body: <p>I'm starting to work with queries in django and I'm trying to replicate the results of a join in sql.</p>
  <p>I have a two models that represent a parent (WaiverAdult) and a child (WaiverMinor). I would like to return the parent and child in the query set, so I can group them in a formatted template, like so:</p>
  <pre><code>  John Dad
      Tommy Son
      Amber Daughter
  
    Jen Jones
      Stevie Jones
      Mike Jones
  </code></pre>
  <p><strong>MODELS:</strong></p>
  <pre><code>class WaiverAdult(models.Model):
      first_name = models.CharField(max_length=50)
      last_name = models.CharField(max_length=50, blank=True)
  
  class WaiverMinor(models.Model):
      first_name = models.CharField(max_length=50, blank=True)
      last_name = models.CharField(max_length=50, blank=True)
      parent = models.ForeignKey(WaiverAdult, on_delete=models.CASCADE)
  </code></pre>
  <p><strong>VIEW:</strong></p>
  <pre><code>class WaiverListView(ListView):
  
      waiver_adults = WaiverAdult.objects.all().prefetch_related(
          'waiverminor_set').order_by('created')
  
      queryset = [adult.waiverminor_set.all() for adult in waiver_adults]
  
      context_object_name = &quot;waiver_list&quot;
      template_name = 'waiver/waiver_list.html'
  </code></pre>
  <p><strong>Template Sample to outline what I'm attempting:</strong></p>
  <pre><code>
                      {% for adult in waiver_list %}
  
                      &lt;tr&gt;
                          &lt;td&gt;{{adult.last_name}}, {{adult.first_name}}&lt;/td&gt;
                      &lt;/tr&gt;
  
                          {% for child in waiver_list %}
                              &lt;tr&gt;
                                  &lt;td&gt;{{child.last_name}}, {{child.first_name}}&lt;/td&gt;
                              &lt;/tr&gt;
                          {% endfor %}
  
  
                      {% endfor %}
  </code></pre>
  <p>What is the proper way to write this query?  Thank you in advance.  I truly appreciate the guidance.</p>