# 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:** 22

<div class="post-metadata">

**Author:** ![adamchainz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/adamchainz/32/26_2.png) [@adamchainz](https://forum.djangoproject.com/u/adamchainz)\
**Post date:** [June 13, 2024, 11:27am UTC](https://forum.djangoproject.com/t/adding-a-template-tag-to-generate-query-strings/24521/22 "2024-06-13T11:27:35Z")

</div>

I’m also -1 on the “quoting keys” suggestion because it breaks consistency. Another place we parse plain keys without quotes is [custom template tags](https://docs.djangoproject.com/en/5.0/howto/custom-template-tags/#simple-tags).

Adding `**kwargs` support sounds like the best way forward to me, and best done as a follow up feature.

Edit: another option could be supporting `{% querystring mydict %}`.

---

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