title: Adding Pagination in View function not showing in template
body: <p>I am trying to add pagination to a list of notifications in a function, so I added Paginator in the function following the documentation in <a href="https://docs.djangoproject.com/en/3.1/topics/pagination/#using-paginator-in-a-view-function" rel="nofollow noreferrer">https://docs.djangoproject.com/en/3.1/topics/pagination/#using-paginator-in-a-view-function</a>, but there is no pagination showing in the template.
  views.py:</p>
  <pre><code>def ShowNotifications(request):
      user=request.user
      notifications= Notification.objects.filter(user=user).order_by('-date')
      template= loader.get_template('notifications/notifications.html')
      paginator = Paginator(notifications, 1) # Show 1 Notification per page.
  
      page_number = request.GET.get('page')
      page_obj = paginator.get_page(page_number)
  
      context = {
          'notifications': notifications,
          'page_obj': page_obj
      }
  
      return HttpResponse(template.render(context, request))
  </code></pre>
  <p>here is the pagination html</p>
  <pre><code>&lt;!--Pagination--&gt;
  {% if is_paginated %}
  &lt;nav class=&quot;d-flex justify-content-center wow fadeIn&quot;&gt;
      &lt;ul class=&quot;pagination pg-blue&quot;&gt;
          &lt;!--Arrow left--&gt;
          {% if page_obj.has_previous %}
          &lt;li class=&quot;page-item&quot;&gt;
              &lt;a class=&quot;page-link&quot; href=&quot;?page={{ page_obj.previous_page_number }}&quot; aria-label=&quot;Previous&quot;&gt;
                  &lt;span aria-hidden=&quot;true&quot;&gt;&amp;laquo;&lt;/span&gt;
                  &lt;span class=&quot;sr-only&quot;&gt;Previous&lt;/span&gt;
              &lt;/a&gt;
          &lt;/li&gt;
          {% endif %}
          &lt;li class=&quot;page-item active&quot;&gt;
              &lt;a class=&quot;page-link&quot; href=&quot;?page={{ page_obj.number}}&quot;&gt;{{ page_obj.number}}
                  &lt;span class=&quot;sr-only&quot;&gt;(current)&lt;/span&gt;
              &lt;/a&gt;
          &lt;/li&gt;
          {% if page_obj.has_next %}
          &lt;li class=&quot;page-item&quot;&gt;
              &lt;a class=&quot;page-link&quot; href=&quot;?page={{ page_obj.next_page_number }}&quot; aria-label=&quot;Next&quot;&gt;
                  &lt;span aria-hidden=&quot;true&quot;&gt;&amp;raquo;&lt;/span&gt;
                  &lt;span class=&quot;sr-only&quot;&gt;Next&lt;/span&gt;
              &lt;/a&gt;
          &lt;/li&gt;
          {% endif %}
      &lt;/ul&gt;
  &lt;/nav&gt;
  {% endif %}
  &lt;!--Pagination--&gt;
  </code></pre>
  <p>I have used the same pagination html in a List View and it worked, so this is the first time to add it in a function.</p>
  <p>My question: What am I doing wrong that prevents pagination from appearing?</p>
  <p>How do I fix it? I am in learning phase so a bit of explanation could be useful.</p>