title: Django: Check in template if queryset is empty
body: <p>I have found the solution for this but only by checking in views so far. I need to check in templates.</p>
  
  <p>My view:</p>
  
  <pre><code>brands = Brand.objects.all()
  for brand in brands:
      brand.products = Product.objects.filter(brand=brand.id)
  </code></pre>
  
  <p>And so in my template I want to show all my brands but not those which do not have any product.</p>
  
  <pre><code>{% for brand in brands %}
      {% if brand.product is not None %}
          &lt;!-- Displays brand --&gt;
      {% endif %}
  {% endfor %}
  </code></pre>
  
  <p>Something like that, but the code <code>is not None</code> doesn't work for empty querysets and it is still displaying brands with no objects in them. What can I do?</p>
  
  <p>EDIT: Sharing model as requested.</p>
  
  <pre><code>class Brand(models.Model):
      name = models.CharField(max_length=100, null=False)
  
      def __str__(self):
          return self.name
  
  
  class Product(models.Model):
      name = models.CharField(max_length=100, null=False)
      brand = models.IntegerField(null=True)
      price = models.DecimalField(max_digits=12, decimal_places=2, null=False)
  
      def __str__(self):
          return self.name
  </code></pre>