title: is there a way to use something like p=product.objects.filter(category=home)?
body: <p>I have some categories that I can filter them by primary key like this :</p>
  <pre><code>p=product.objects.filter(category=2)
  </code></pre>
  <p>but I do not want to bother my self with primary keys I want to filter with exact name of the category not primary key.</p>
  <p>I have categories like this :</p>
  <p><a href="https://i.stack.imgur.com/mIvyg.png" rel="nofollow noreferrer">image</a></p>
  <p>is there a way to use something like <code>p=product.objects.filter(category=home)</code> ?</p>
  <p>models:</p>
  <pre><code>class category(models.Model):
  
      name=models.CharField(max_length=255, db_index=True)
  
      def __str__(self):
          return self.name
  
  class product(models.Model):
       
      category = models.ForeignKey(category, related_name='products',on_delete=models.CASCADE) 
      image=models.CharField(max_length=500)
      description=models.CharField(max_length=500)
      price=models.CharField(max_length=50)
      buy=models.CharField(max_length=100)
   
  </code></pre>