Django 1.9: render cannot pass context to my template
<p>I'm trying to use render(request,'sell.thml',context) in django 1.9, I use mysql to be my database. but nothing show up in my template. I don't know why I cannot use render to pass my context variable to template. Anyone can help me about it?</p>

<p>In my view.py:</p>

<pre><code>def sellmainpage(request):
    products=Product.objects.all()
    context = {
        "products": products,
    }
    return render(request, "sell.html", context)
</code></pre>



<p>In my sell.html:</p>

<pre><code>&lt;div class="col-md-8 col-md-offset-2 col-sm-12 maincontent" style="padding-top:100px"&gt;
&lt;div class="storefront_product_display" &gt;
  {% for product in products %}
  &lt;a href="{% url 'product_detail' %}"&gt;
  &lt;img src="{% static 'img/logo.png' %}"&gt;
  &lt;span class="storefront_product_name"&gt;{{ product.product }}&lt;/span&gt;
  &lt;span class="storefront_product_companyname"&gt;{{ product.company }} &lt;/span&gt;
  {% endfor %}
&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>in my models.py:</p>

<pre><code>class Product(models.Model):
    product=models.CharField(max_length=200)
    company=models.ForeignKey(Company)
    description=models.TextField()
    price=models.DecimalField(decimal_places=2,max_digits=10)
    stock=models.IntegerField(default=0)

    def __str__(self):
        return self.product
</code></pre>