title: Django - how to make OR query for unknown number of values
body: <p>I'm working on small app where user passes list of cities in GET request. I need to fetch all data where given city exists. My current solution works but I'm looking for something more efficient. Currently I'm creating separate array and adding following querySets in loop. Is there a way to make it within one query ?
  I also thought about raw query but I'm not sure if it is recommended.</p>
  <pre><code>def get(self, request):
          search_phrase = request.GET[&quot;search&quot;]
          cities = request.GET[&quot;city&quot;].split(&quot;,&quot;)
          found_results = []
          for city in cities:
              found_results += Job.objects.filter(position__icontains=search_phrase, city=city)
          return render(request, &quot;search.html&quot;, {&quot;results&quot;:found_results})
  </code></pre>