{% load i18n %} {% comment %} Server-paging navigation shared by every paginated list/detail view. ``page_obj`` — the Django ``Page`` for the current request. ``pagination_query`` — a dict of the active filter params; each truthy entry is appended to the prev/next links so the filter survives a page step. Iterating a precomputed dict (not branching per filter) is what keeps a new filter from needing a new ``if`` in every list template. Self-guards on ``has_other_pages`` so a caller can include it unconditionally. {% endcomment %} {% if page_obj.has_other_pages %} {% endif %}