Add {% querystring %} template tag to add, remove, and update querystring parameters
Review Request #9712 — Created March 1, 2018 and submitted — Latest diff uploaded
Information | |
---|---|
mandeep | |
Djblets | |
release-1.0.x | |
9745 | |
22f8586... | |
Reviewers | |
djblets | |
brennie |
Previously, it was only possible to update a single query parameter with
{% querystring_with %}
. However, in the name of future proofing, it
became necessary to make a new template tag{% querystring %}
that can take an arbitrary number of key-value pairs now with different
modes in the form of:
{% querystring “mode” "key1=value1" "key2=value2" %}
The three different modes are:
“remove” - Will remove keys from the query string.
“append” - Will append values for its given key without overwriting.
“update” - Will add to or replace part of a query string.
Ran unit tests.