| | Previously, it was only possible to update a single query parameter with
|
~ | | {% querystring_with %} . However, it is frequently the case that it
|
~ | | would be handy to update the querystring from within the template rather
|
~ | | than having to enumerate all possible cases in the view. Now
|
~ | | {% querystring_with_fragments %} can take an arbitrary number of
|
| ~ | {% 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: |
- | | key-value pairs in the form of now with different modes: |
| |
|
~ | | |
| ~ | {% querystring “mode” "key1=value1" "key2=value2" %}
|
- | |
|
- | | {% querystring_with “mode” "key1=value1" "key2=value2" %}
|
| |
|
| | There are 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. |