title: Django Template not rendering
body: <p>I am trying to load a list of objects from a MySQL database using Django templates. I can load the objects from the database using <code>Product.objects.values()</code> and convert it into a dict, then pass that dict as a context to the render function. But when I load my page, it does not iterate the dictionary. Has anyone any ideas?</p>
  
  <pre><code> def product(request):
      print(Product.objects.values())
  
      d = Product.objects.values()
  
      newdict = {}
  
      for entry in d:
          name = entry.pop('name')  # remove and return the name field to use as a key
          newdict[name] = entry
  
      print(newdict)
      return render(request, 'product.html', newdict)
  
  
  
  
   &lt;div class="col-12 col-lg-6 add_to_cart_block"&gt;
  
              {% for item in newdict.items %}
              {{newdict|length}}
              &lt;div class="card bg-light mb-3"&gt;
                  &lt;div class="card-body"&gt;
                      &lt;p class="price"&gt;{{item}}&lt;/p&gt;
                      &lt;p class="price_discounted"&gt;149.90 $&lt;/p&gt;
                      &lt;form method="get" action="cart.html"&gt;
                          &lt;div class="form-group"&gt;
                              &lt;label for="colors"&gt;Color&lt;/label&gt;
                              &lt;select class="custom-select" id="colors"&gt;
                                  &lt;option selected&gt;Select&lt;/option&gt;
                                  &lt;option value="1"&gt;Blue&lt;/option&gt;
                                  &lt;option value="2"&gt;Red&lt;/option&gt;
                                  &lt;option value="3"&gt;Green&lt;/option&gt;
                              &lt;/select&gt;
                          &lt;/div&gt;
                          &lt;div class="form-group"&gt;
                              &lt;label&gt;Quantity :&lt;/label&gt;
                              &lt;div class="input-group mb-3"&gt;
                                  &lt;div class="input-group-prepend"&gt;
                                      &lt;button type="button" class="quantity-left-minus btn btn-danger btn-number"  data-type="minus" data-field=""&gt;
                                          &lt;i class="fa fa-minus"&gt;&lt;/i&gt;
                                      &lt;/button&gt;
                                  &lt;/div&gt;
                                  &lt;input type="text" class="form-control"  id="quantity" name="quantity" min="1" max="100" value="1"&gt;
                                  &lt;div class="input-group-append"&gt;
                                      &lt;button type="button" class="quantity-right-plus btn btn-success btn-number" data-type="plus" data-field=""&gt;
                                          &lt;i class="fa fa-plus"&gt;&lt;/i&gt;
                                      &lt;/button&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;a href="cart.html" class="btn btn-success btn-lg btn-block text-uppercase"&gt;
                              &lt;i class="fa fa-shopping-cart"&gt;&lt;/i&gt; Add To Cart
                          &lt;/a&gt;
                      &lt;/form&gt;
                      &lt;div class="product_rassurance"&gt;
                          &lt;ul class="list-inline"&gt;
                              &lt;li class="list-inline-item"&gt;&lt;i class="fa fa-truck fa-2x"&gt;&lt;/i&gt;&lt;br/&gt;Fast delivery&lt;/li&gt;
                              &lt;li class="list-inline-item"&gt;&lt;i class="fa fa-credit-card fa-2x"&gt;&lt;/i&gt;&lt;br/&gt;Secure payment&lt;/li&gt;
                              &lt;li class="list-inline-item"&gt;&lt;i class="fa fa-phone fa-2x"&gt;&lt;/i&gt;&lt;br/&gt;+33 1 22 54 65 60&lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;/div&gt;
                      &lt;div class="reviews_product p-3 mb-2 "&gt;
                          3 reviews
                          &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                          &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                          &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                          &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                          &lt;i class="fa fa-star"&gt;&lt;/i&gt;
                          (4/5)
                          &lt;a class="pull-right" href="#reviews"&gt;View all reviews&lt;/a&gt;
                      &lt;/div&gt;
                      &lt;div class="datasheet p-3 mb-2 bg-info text-white"&gt;
                          &lt;a href="" class="text-white"&gt;&lt;i class="fa fa-file-text"&gt;&lt;/i&gt; Download DataSheet&lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          {% endfor %}
      &lt;/div&gt;
  </code></pre>