{% if is_paginated %}
<ul class="pagination">
{% if page_obj.has_previous %}
    <li>
        <span><a data-ajax=true href="{% url "comment_list" %}?pk={{pk}}&appname={{appname}}&model={{model}}&page={{ page_obj.previous_page_number }}">Previous</a></span>
    </li>
{% endif %}
    <li class="">
        <span>Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}.</span>
    </li>
{% if page_obj.has_next %}
    <li>
        <span><a data-ajax=true href="{% url "comment_list" %}?pk={{pk}}&appname={{appname}}&model={{model}}&page={{ page_obj.next_page_number }}">Next</a></span>
    </li>
{% endif %}
</ul>
{% endif %}