title: How to dynamically compose an OR query filter in Django?
body: <p>From an example you can see a multiple OR query filter:</p>
  
  <pre><code>Article.objects.filter(Q(pk=1) | Q(pk=2) | Q(pk=3))
  </code></pre>
  
  <p>For example, this results in:</p>
  
  <pre><code>[&lt;Article: Hello&gt;, &lt;Article: Goodbye&gt;, &lt;Article: Hello and goodbye&gt;]
  </code></pre>
  
  <p>However, I want to create this query filter from a list. How to do that?</p>
  
  <p>e.g. <code>[1, 2, 3] -&gt; Article.objects.filter(Q(pk=1) | Q(pk=2) | Q(pk=3))</code></p>