Last active
July 25, 2019 19:55
-
-
Save mdaizovi/d86de8fea0f342af960c2c5eb59e57a0 to your computer and use it in GitHub Desktop.
Overriding the django admin template to create Back/Forward (or Next/Previous) buttons (1 of 2)
This file contains hidden or 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
<!-- templates/admin/pagination.html --> | |
{% load admin_list %} | |
{% load i18n %} | |
{% load content_extras %} | |
<p class="paginator"> | |
{% if pagination_required %} | |
{% for i in page_range %} | |
{% if forloop.first %} | |
{% back_url cl i %} | |
{% endif %} | |
{% paginator_number cl i %} | |
{% if forloop.last %} | |
{% forward_url cl i %} | |
{% endif %} | |
{% endfor %} | |
{% endif %} | |
{{ cl.result_count }} {% if cl.result_count == 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endif %} | |
{% if show_all_url %} <a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a>{% endif %} | |
{% if cl.formset and cl.result_count %}<input type="submit" name="_save" class="default" value="{% trans 'Save' %}"/>{% endif %} | |
</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment