Skip to content

Instantly share code, notes, and snippets.

@Kuzyashin
Created June 30, 2019 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kuzyashin/f28f511cd8401294c3ead937560c2775 to your computer and use it in GitHub Desktop.
Save Kuzyashin/f28f511cd8401294c3ead937560c2775 to your computer and use it in GitHub Desktop.
template.html
{% if is_paginated %}
<ul class="pagination">
{% if page.has_previous %}
<li>
<span><a href="?page={{ page.previous_page_number }}">Previous</a></span>
</li>
{% endif %}
<li class="">
<span>Page {{ page.number }} of {{ page.paginator.num_pages }}.</span>
</li>
{% if page.has_next %}
<li>
<span><a href="?page={{ page.next_page_number }}">Next</a></span>
</li>
{% endif %}
</ul>
{% else %}
<h3>END</h3>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment