title: Django Paginator shows post titles Not Page numbers, why?
body: <p>i'm trying to use Django Paginator using ListView, but the paginator shows post title instead of page number:
  <a href="https://i.stack.imgur.com/b97Ld.png" rel="nofollow noreferrer">Page number replaced with post title</a></p>
  <p>how can i fix that?
  this is my code:
  in <code>views.py</code>:</p>
  <pre><code>from django.shortcuts import render
  from django.core.paginator import Paginator
  from django.views.generic import ListView, DetailView
  from .models import Post
  
  # Create your views here.
  
  
  # PostObject_list by using ListView
  class PostList(ListView):
      model=Post
      paginate_by=20
      context_object_name='all_posts'
      ordering=['-created_at']
  
  
  # allpost by using ListView
  '''class AllPost(ListView):
      model=Post
      context_object_name='allpost'
      paginate_by=None
  '''    
  
  # Post_singl_object using DetailView
  class PostDetail(DetailView):
      model=Post
  </code></pre>
  <p>in template <code>post_list.html</code> :</p>
  <pre><code> &lt;/div&gt;
              &lt;nav aria-label=&quot;Page navigation example&quot;&gt;
                  &lt;ul class=&quot;pagination d-flex justify-content-center mt-1&quot;&gt;
                      {% if all_posts.has_previous  %}
                      &lt;li class=&quot;page-item &quot;&gt;&lt;a class=&quot;page-link&quot; href=&quot;?page={{ all_posts.previous_page_number }}&quot;&gt;Previous&lt;/a&gt;&lt;/li&gt;
                      {% endif %}
  
                      {% for page in all_posts %}
                          &lt;li class=&quot;page-item &quot;&gt;
                          
                               &lt;a class=&quot;page-link&quot; href=&quot;?page={{ page }}&quot;&gt;&lt;span&gt;{{page}}&lt;/span&gt;&lt;/a&gt;
                          &lt;/li&gt;
                      {% endfor %}
                   
                      {% if all_posts.has_next %}
                           &lt;li class=&quot;page-item&quot;&gt;&lt;a class=&quot;page-link&quot; href=&quot;?page={{all_posts.previous_page_number }}&quot;&gt;Next&lt;/a&gt;&lt;/li&gt;
                      {% endif %}
                  &lt;/ul&gt;
              &lt;/nav&gt;
              &lt;/div&gt;
              &lt;!-- Pagination--&gt;
  </code></pre>
  <p>thank you!</p>