title: How can I combine two or more querysets in a Django view?
body: <p>I am trying to build the search for a Django site I am building, and in that search, I am searching in three different models. And to get pagination on the search result list, I would like to use a generic object_list view to display the results. But to do that, I have to merge three querysets into one.</p>
  <p>How can I do that? I've tried this:</p>
  <pre><code>result_list = []
  page_list = Page.objects.filter(
      Q(title__icontains=cleaned_search_term) |
      Q(body__icontains=cleaned_search_term))
  article_list = Article.objects.filter(
      Q(title__icontains=cleaned_search_term) |
      Q(body__icontains=cleaned_search_term) |
      Q(tags__icontains=cleaned_search_term))
  post_list = Post.objects.filter(
      Q(title__icontains=cleaned_search_term) |
      Q(body__icontains=cleaned_search_term) |
      Q(tags__icontains=cleaned_search_term))
  
  for x in page_list:
      result_list.append(x)
  for x in article_list:
      result_list.append(x)
  for x in post_list:
      result_list.append(x)
  
  return object_list(
      request,
      queryset=result_list,
      template_object_name='result',
      paginate_by=10,
      extra_context={
          'search_term': search_term},
      template_name=&quot;search/result_list.html&quot;)
  </code></pre>
  <p>But this doesn't work. I get an error when I try to use that list in the generic view. The list is missing the clone attribute.</p>
  <p>How can I merge the three lists, <code>page_list</code>, <code>article_list</code> and <code>post_list</code>?</p>