Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <nav>
- <ul class="pagination">
- <li class="page-item">
- {% if page.has_previous %}
- <a class="page-link" href="?page={{page.previous_page_number}}">Poprzednia</a>
- {% else %}
- <a class="page-link disabled">Poprzednia</a>
- {% endif %}
- </li >
- {% for num in page.paginator.page_range %}
- {% if page.number == num %}
- <li class="page-item active">
- <a class="page-link" href="?page={{num}}">{{num}}</a>
- </li >
- {% elif num > page.number|add:'-3' and num < page.number|add:'3' %}
- <li class="page-item">
- <a class="page-link" href="?page={{num}}">{{num}}</a>
- </li >
- {% endif %}
- {% endfor %}
- <li class="page-item">
- {% if page.has_next %}
- <a class="page-link" href="?page={{page.next_page_number}}">Następna</a>
- {% else %}
- <a class="page-link disabled">Następna</a>
- {% endif %}
- </li >
- </ul>
- </nav>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement