Custom pagination templates
[django-pagination.git] / pagination / templates / pagination / pagination.html
index fbb678d..fd925f0 100644 (file)
@@ -1,25 +1 @@
-{% if is_paginated %}
-<div class="pagination">
-    {% if page_obj.has_previous %}
-        <a href="?page={{ page_obj.previous_page_number }}">&lsaquo;&lsaquo; previous</a>
-    {% else %}
-        <span class="disabled">&lsaquo;&lsaquo; previous</span>
-    {% endif %}
-    {% for page in pages %}
-        {% if page %}
-            {% ifequal page page_obj.number %}
-                <span class="current">{{ page }}</span>
-            {% else %}
-                <a href="?page={{ page }}{% if q %}&amp;q={{ q }}{% endif %}">{{ page }}</a>
-            {% endifequal %}
-        {% else %}
-        ...
-        {% endif %}
-    {% endfor %}
-    {% if page_obj.has_next %}
-        <a href="?page={{ page_obj.next_page_number }}">next &rsaquo;&rsaquo;</a>
-    {% else %}
-        <span class="disabled">next &rsaquo;&rsaquo;</span>
-    {% endif %}
-</div>
-{% endif %}
\ No newline at end of file
+{% include pagination_template %}