title: Need to Fetch specific foreign key object product from database in Django
body: <p>Hi everyone I am new at Django and working on e-commerce site. I create a model name category and pass it to model shop by using foreign key. In Category model I have category <strong>Sale</strong> and i want to fetch all products that have category sale in my landing page and rest of us in shop page. Any one please help me how  I do it?
  <strong>My model.py code is:</strong></p>
  <pre><code>class category(models.Model):
     name = models.CharField(max_length=200)
     def __str__(self):
        return self.name
  class shop(models.Model):
    s_id = models.AutoField(primary_key=True)
    s_name = models.CharField(max_length=50)
    s_category = models.ForeignKey(category, on_delete= models.CASCADE)
    s_artical_no = models.IntegerField(default=0)
  </code></pre>
  <p><strong>View.py:</strong></p>
  <pre><code>def index(request):
   prod = shop.objects.get(s_category = 4) 
   params = {'prod': prod}
   return render(request, &quot;main/index.html&quot;, params )
  </code></pre>