New in Django 5.1, the {% querystring %}
template tag lets you render
encoded querystrings directly from the template.
Example:
{% querystring order="date" %}
yields
?term=templatetags&order=date
from a page with the URL /search/?term=templatetags
.
See: https://docs.djangoproject.com/en/5.1/ref/templates/builtins/#querystring