title: Remove object from Django query list in for
body: <p>I would like to exclude some objects from a query list based on a number of checks - the first a simple for loop that checks if each item has 'expired'. However, when ever I do this, it returns all objects.</p>
  
  <pre><code>now = datetime.datetime.now()
  food = Food.objects.filter(user=self.user, in_cupboard=True)
  
            for f in food:
                if (f.cupboard.close_date + timedelta(days=1)) &lt; now:
                    f.exclude(pk=f.id)
  </code></pre>
  
  <p>What is the correct way to 'filter' objects using a for list?</p>