title: Problem passing list to a template Django
body: <p>I'm trying to pass a list of books from views.py to a html template.</p>
  
  <p>I took the datetime example and modified it but it's not working.</p>
  
  <p>Here is my views.py:</p>
  
  <pre><code>def theBooks(request): 
      t = template.loader.get_template('templates/index.html')
      the_books = Book.objects.all()
      c = template.Context({'books': the_books})
      html = t.render(c)
      return HttpResponse(html)
  </code></pre>
  
  <p>And my template is:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
   &lt;html lang="es"&gt;
   &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Current Time&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;
  
      {# This is a comment #}
  
      {# check the existence of now variable in the template using if tag #}
  
    {% if now %}   
       &lt;p&gt;The books are: {{ books }}&lt;/p&gt;
    {% else %}               
      &lt;p&gt;now variable is not available&lt;/p&gt;
    {% endif %}
  
   &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>