{% extends "news/base.html" %} {% block content %}
{% for article in articles %}
{% if forloop.counter|divisibleby:3 %}
{% endif %} {% endfor %}
{% if is_paginated %} {% if page_obj.has_previous %} First Previous {% endif %} {% for num in page_obj.paginator.page_range %} {% if page_obj.number == num %} {{ num }} {% elif num > page_obj.number|add:'-3' and num < page_obj.number|add:'3' %} {{ num }} {% endif %} {% endfor %} {% if page_obj.has_next %} Next Last {% endif %} {% endif %} {% endblock content %}