Yep. My solution is a custom template tag
from django.template.defaulttags import register
from urllib.parse import urlencode
@register.simple_tag(takes_context=True)
def querystringmod(context, *args):
"""Modify current querystring:
{% querystringmod name value [name value [...]] %}
The code for rendering pagination controls in my app is the same everywhere:
{% if is_paginated %}
{% if page_obj.has_previous %}
Previous
{% endif %}
{% if page_obj.has_next %}
Previous
{% endif %}
2 matches
Mail list logo