I believe django 5.1 querystring tag is a solution here :) https://docs.djangoproject.com/en/5.1/ref/templates/builtins/#std-templatetag-querystring