title: How can I filter a Django query with a list of values?
body: <p>I'm sure this is a trivial operation, but I can't figure out how it's done.</p>
  
  <p>There's got to be something smarter than this:</p>
  
  <pre><code>ids = [1, 3, 6, 7, 9]
  
  for id in ids:
      MyModel.objects.filter(pk=id)
  </code></pre>
  
  <p>I'm looking to get them all in one query with something like:</p>
  
  <pre><code>MyModel.objects.filter(pk=[1, 3, 6, 7, 9])
  </code></pre>
  
  <p>How can I filter a Django query with a list of values?</p>