Reputation: 3818
I use the url template tag with named URLs all the time in Django but now I need to be able to pass query strings to a couple of URLs in a Django template. Is this possible to do? The url template tag documentation does not mention GET query strings at all and hardcoding in URLs is bad practice if you ever want to change the URL in the future you also need to change the templates.
Upvotes: 0
Views: 137
Reputation: 13559
Well, I do not quite understand but... I think you want something like this:
<a title="" href="{% url my_url %}?foo=bar&spam=eggs">My link</a>
Upvotes: 2