Here is the code for the next lecture containing pagination for Book List View:

{% if is_paginated %}
    <div class="mt-3">
        <ul class="inline-flex items-center -space-x-px">

            {% if page_obj.has_previous %}
                <li>
                    <a {% if page_obj.has_previous %}href="?page={{ page_obj.previous_page_number }}"{% else %} href="" {% endif %} class="block px-3 py-2 leading-tight text-gray-500 bg-white border border-gray-300 rounded-l-lg hover:bg-gray-200 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">                    
                        <svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg>
                    </a>
                </li>
            {% endif %}

            {% for i in page_obj.paginator.page_range %}
                {% if page_obj.number == i %}
                    <li><a class="px-3 py-2 leading-tight text-gray-500 dark:text-gray-100 bg-gray-200 dark:bg-gray-700 border border-gray-300 hover:bg-white hover:text-gray-700  dark:border-gray-700 dark:hover:bg-gray-700 dark:hover:text-white" href="?page={{ i }}">{{ i }}</a></li>
                {% else %}
                    <li><a class="px-3 py-2 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white" href="?page={{ i }}">{{ i }}</a></li>
                {% endif %}
            {% endfor %}

            {% if page_obj.has_next %}
                <li>
                    <a {% if page_obj.has_next %}href="?page={{ page_obj.next_page_number }}"{% else %} href="" {% endif %} class="block px-3 py-2 leading-tight text-gray-500 bg-white border border-gray-300 rounded-r-lg hover:bg-gray-200 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">                    
                        <svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>
                    </a>
                </li>
            {% endif %}
        </ul>
    </div>
{% endif %}