title: Django MultiDimensional Queryset on Related objects
body: <p>I'm a Django newbie and I created a quiz application. I'm wondering if it's possible to do just a single query and get a multi-level queryset for three related tables.</p>
  
  <p>A Quiz has multiple questions and a question has multiple choices.</p>
  
  <p>quizzes/models.py:</p>
  
  <pre><code>class Quiz(models.Model):
      title = models.CharField(max_length=200)
  
  class Question(models.Model):
      quiz_id = models.ForeignKey("Quiz", db_column="quiz_id")
      question = models.TextField()
  
  class Choice(models.Model):
      question_id = models.ForeignKey("Question", db_column="question_id")
      text = models.TextField()
  </code></pre>
  
  <p>The result I'm expecting is something like this:</p>
  
  <pre><code>[{
  quiz_id:1,
  quiz_title: "Quiz Title",
  quiz_questions:
  [
      {
          question_id:1,
          question_question:"The Question",
          question_choices:[
              {
                  choice_id:1,
                  choice_text:"The Choice Text"
              },
              {
                  choice_id:2,
                  choice_text:"The Choice Text"
              }]
      },
      {
          question_id:2,
          question_question:"The Question",
          question_choices:[
              {
                  choice_id:1,
                  choice_text:"The Choice Text"
              },
              {
                  choice_id:2,
                  choice_text:"The Choice Text"
              }]
      }
  ]
  }]
  </code></pre>
  
  <p>Is it possible to get this kind of result by using just a single query?
  So far I can get a single Quiz object and get all related Questions by doing:</p>
  
  <pre><code>quiz_object.questions_set.all()
  </code></pre>
  
  <p>However, I can't get to the Choices level and the results are stored in different variables.</p>