1👍
✅
You don’t need Django’s url
tag here. The url
tag is to resolve to URLs that belong to your application.
However, there is the nice django-spurl library. It allows you to handle query parameters via template tags.
An example from the documentation to add query parameters:
{% spurl base="http://example.com/?foo=bar" add_query="bar=baz" %}
<!--
will result in: http://example.com?foo=bar&bar=baz
-->
Source:stackexchange.com