# Adding a template tag to generate query strings

**URL:** <https://forum.djangoproject.com/t/adding-a-template-tag-to-generate-query-strings/24521>\
**Category:** Django Internals\
**Created:** [October 14, 2023, 4:46pm UTC](https://forum.djangoproject.com/t/adding-a-template-tag-to-generate-query-strings/24521 "2023-10-14T16:46:00Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![carltongibson](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/carltongibson/32/267_2.png) [@carltongibson](https://forum.djangoproject.com/u/carltongibson)\
**Post date:** [June 13, 2024, 12:56pm UTC](https://forum.djangoproject.com/t/adding-a-template-tag-to-generate-query-strings/24521/28 "2024-06-13T12:56:14Z")

</div>

This comment from @bmispelon corresponds to my view:

> [@bmispelon](#):
>
> I don’t have a super strong opinion about it but I’m not in favor of having to quote keys. I feel that it makes the “normal” use-case more complicated for the benefit of a rare one.
> 
> …
> 
> To me, this could be fixed instead by adding support for `*args` and `**kwargs` syntax in the template language, but I realize that’s quite a big undertaking (though it would also solve similar issues with the `{% cycle %}` tag.

I think both having to quote literal keys would be a pain, and that some kind of `**kwarg` expansion would be a generally useful technique for us to pick up.

(No opinion on the possible name change. 🤷 )

---

_[View the full topic](https://forum.djangoproject.com/t/adding-a-template-tag-to-generate-query-strings/24521)._
