<nav>
    <ul class="pager">
        {% if blogs.has_previous %}
            <li class="previous">
                <a href="?page={{ blogs.previous_page_number }}{% for key,value in request.GET.items %}{% ifnotequal key 'page' %}&amp;{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">
                    Newer Posts
                </a>
            </li>
        {% endif %}
        {% if blogs.has_next %}
            <li class="next">
                <a href="?page={{ blogs.next_page_number }}{% for key,value in request.GET.items %}{% ifnotequal key 'page' %}&amp;{{ key }}={{ value }}{% endifnotequal %}{% endfor %}">
                    Older Posts
                </a>
            </li>
        {% endif %}
    </ul>
    Page {{ blogs.number }} of {{ blogs.paginator.num_pages }}
</nav>
