Created
May 11, 2017 08:14
-
-
Save vladimirmyshkovski/a88ff6e41837da18c488e93d20e6e7d2 to your computer and use it in GitHub Desktop.
CBV paginate for django template with russian language
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if is_paginated %} | |
<div class="pagination"> | |
<span class="page-links"> | |
{% if page_obj.has_previous %} | |
<a href="{% url 'cities:cities' %}?page={{ page_obj.previous_page_number }}">Предыдущая</a> | |
{% endif %} | |
<span class="page-current"> | |
страница {{ page_obj.number }} из {{ page_obj.paginator.num_pages }}. | |
</span> | |
{% if page_obj.has_next %} | |
<a href="{% url 'cities:cities' %}?page={{ page_obj.next_page_number }}">Следующая</a> | |
{% endif %} | |
</span> | |
</div> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment