summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNatalia <124304+nessita@users.noreply.github.com>2025-03-20 12:21:31 -0300
committernessita <124304+nessita@users.noreply.github.com>2025-03-24 11:53:42 -0300
commitb1c1fd33ed7a1192050b25bd0a256a97326d7692 (patch)
tree568e46bcfe277ef54be6c2f0ba336c982d367949 /docs
parent639eafbd27926b47f849c0a1f6ff9ebe5380ca57 (diff)
Improved and reorganized querystring template tag docstring and ref docs.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/templates/builtins.txt22
1 files changed, 11 insertions, 11 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
index f5470ad0eb..5712b65d54 100644
--- a/docs/ref/templates/builtins.txt
+++ b/docs/ref/templates/builtins.txt
@@ -996,17 +996,6 @@ Outputs the current query string verbatim. So if the query string is
Outputs the current query string with the addition of the ``size`` parameter.
Following the previous example, the output would be ``?color=green&size=M``.
-Custom QueryDict
-~~~~~~~~~~~~~~~~
-
-.. code-block:: html+django
-
- {% querystring my_query_dict %}
-
-You can provide a custom ``QueryDict`` to be used instead of ``request.GET``.
-So if ``my_query_dict`` is ``<QueryDict: {'color': ['blue']}>``, this outputs
-``?color=blue``.
-
Setting items
~~~~~~~~~~~~~
@@ -1040,6 +1029,17 @@ Handling lists
If ``my_list`` is ``["red", "blue"]``, the output will be
``?color=red&color=blue``, preserving the list structure in the query string.
+Custom QueryDict
+~~~~~~~~~~~~~~~~
+
+.. code-block:: html+django
+
+ {% querystring my_query_dict %}
+
+You can provide a custom ``QueryDict`` to be used instead of ``request.GET``.
+So if ``my_query_dict`` is ``<QueryDict: {'color': ['blue']}>``, this outputs
+``?color=blue``.
+
Dynamic usage
~~~~~~~~~~~~~