title: Django - Queryset to get all related details to a Model
body: <p>I have a Book model which has multiple authors, genres. Here are the models which have all the ForeignKey relations.  </p>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>class Book(models.Model):
      title = models.CharField(max_length=200)
  
  class Author(models.Model):
      name = models.CharField(max_length=100)
  
  class Genre(models.Model):
      genre_name = models.CharField(max_length=50)
  
  class Book_author(models.Model):
      book = models.ForeignKey(Book)
      author = models.ForeignKey(Author)
  
  class Book_genre(models.Model):
      book = models.ForeignKey(Book)
      genre = models.ForeignKey(Genre)
  </code></pre>
  
  <p><strong>views.py</strong>  </p>
  
  <pre><code>def book_detail(request, book_id):
      book = Book.objects.get(pk=book_id)
      # how can i get iterated multiple authors, books attached to book dictionary
      return render(request, 'detail.html', {'book': book})
  </code></pre>
  
  <p><strong>book object example:</strong>  </p>
  
  <pre><code>book = {
      title: 'some title',
      authors: [
                {
                   id: 1,
                   name: 'name1'
                },
                {
                   id: 2,
                   name: 'name2'
                }
      ],
      genres: [
           {
              id: 1,
              genre_name: 'somegenre1' 
           },
           {
              id: 1,
              genre_name: 'somegenre2' 
           }
      ]
  }
  </code></pre>
  
  <p>How can i access Book related authors, genre's in my views.py method</p>