title: Django multiple queryset combine into a pagination
body: <p>I have combine 2 queryset from different models into a list and used pagination to display as a single list.</p>
  
  <p>The problem is the objects from the list are displayed by the pagination according to the models they were created from.</p>
  
  <p><img src="https://i.stack.imgur.com/RxCym.jpg" alt="enter image description here"></p>
  
  <p>How could I fix the list so when a new object is created from the models. It will be displayed after the recently created object even though the recent object created was from a different models.</p>
  
  <p>Example would be . I have a combine queryset of user's whiteboard and user's comment. If a new whiteboard 's object was created recently and I would create another comment . The comment would be displayed by the pagination after the whiteboard 's object instead of been displayed with all the other comments further down the paginated because it was in a different models</p>
  
  <p><img src="https://i.stack.imgur.com/l2Ajw.jpg" alt="enter image description here"></p>
  
  <p>I hope you can get the idea of what i'm trying to achieve :)</p>
  
  <p>Parts of my module</p>
  
  <pre><code>class WhiteBoard(models.Model):
  
      user = models.ForeignKey(User)
      name = models.CharField(max_length=100)
      created = models.DateTimeField(auto_now_add=True)
      picture = models.OneToOneField('Picture',related_name='picture',blank=True,null=True)
      def __unicode__(self):
          return self.name
  
  
  class Comment(models.Model):
      created = models.DateTimeField(auto_now_add=True)
      user = models.ForeignKey(User)
      body = models.TextField()
      picture = models.ForeignKey(Picture)
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>@login_required
  def archive(request):
          user = User.objects.get(username=request.user)
          person = Person.objects.get(user=user)
          users = User.objects.filter(pk__in=person.following.all().values_list('user__pk',flat=True))
          picture = whiteboard .objects.filter(user__in=users).order_by("-created")
          comment = Comment.objects.filter(user__in=users).order_by("-created")
          posts= list(chain(picture,comment))
          paginator = Paginator(posts, 5)
  
          try: page = int(request.GET.get("page", '1'))
          except ValueError: page = 1
  
          try:
              posts = paginator.page(page)
          except (InvalidPage, EmptyPage):
              posts = paginator.page(paginator.num_pages)
          return render(request,'archive.html',{'picture':picture,'comment':comment,'posts':posts})
  </code></pre>
  
  <p>archive.html</p>
  
  <pre><code>{% for post in posts.object_list %}
  
  {{post.name }}
  &lt;br&gt;
  {{post.body}}
  {% endfor %}
  
          &lt;!-- Next/Prev page links  --&gt;
          {% if posts.object_list and posts.paginator.num_pages &gt; 1 %}
          &lt;div class="pagination" style="margin-top: 20px; margin-left: -20px; "&gt;
              &lt;span class="step-links"&gt;
                  {% if posts.has_previous %}
                          &lt;a href= "?page={{ posts.previous_page_number }}"&gt;newer entries &amp;lt;&amp;lt; &lt;/a&gt;
                  {% endif %}
  
                      &lt;span class="current"&gt;
                      &amp;nbsp;Page {{ posts.number }} of {{ posts.paginator.num_pages }}
                  &lt;/span&gt;
  
              {% if posts.has_next %}
                      &lt;a href="?page={{ posts.next_page_number }}"&gt; &amp;gt;&amp;gt; older entries&lt;/a&gt;
              {% endif %}
          &lt;/span&gt;
      &lt;/div&gt;
      {% endif %}
  
  &lt;/div&gt;
  </code></pre>