- Author:
- guilegarcia
- Posted:
- October 11, 2015
- Language:
- HTML/template
- Version:
- Not specified
- Score:
- 0 (after 0 ratings)
Create a list of pages using Django 1.8 and marks the current page. Using Bootstrap. * "list_itens" is a list of itens paginated.
1 2 3 4 5 6 7 8 9 10 11 | {% if num_pages %}
<ul class="pagination">
{% for num in num_pages %}
{% if num == list_itens.number %}
<li class="active"><a href="?page={{ num }}">{{ num }}</a></li>
{% else %}
<li><a href="?page={{ num }}">{{ num }}</a></li>
{% endif %}
{% endfor num_pages %}
</ul>
{% endif %}
|
More like this
- Bootstrap Accordian by Netplay4 5 years, 11 months ago
- Bootstrap theme for django-endless-pagination? by se210 8 years, 11 months ago
- Bootstrap theme for django-endless-pagination? by se210 8 years, 11 months ago
- Reusable form template with generic view by roldandvg 9 years ago
- django form template with bootstrap by youyongsong 9 years, 11 months ago
Comments
Please login first before commenting.