File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,8 @@ Toolbar options
9898
9999 The toolbar keeps up to this many results in memory.
100100
101+ .. _ROOT_TAG_EXTRA_ATTRS :
102+
101103* ``ROOT_TAG_EXTRA_ATTRS ``
102104
103105 Default: ``'' ``
Original file line number Diff line number Diff line change @@ -25,12 +25,19 @@ Working with htmx and Turbo
2525
2626Libraries such as `htmx <https://htmx.org/ >`_ and
2727`Turbo <https://turbo.hotwired.dev/ >`_ need additional configuration to retain
28- the toolbar handle through page renders.
28+ the toolbar handle element through page renders. This can be done by
29+ configuring the :ref: `ROOT_TAG_EXTRA_ATTRS <ROOT_TAG_EXTRA_ATTRS >` to include
30+ the relevant JavaScript library's attribute.
2931
3032htmx
3133~~~~
3234
33- In ``settings.py ``, add::
35+ The attribute `htmx <https://htmx.org/ >`_ uses is
36+ `hx-preserve <https://htmx.org/attributes/hx-preserve/ >`_.
37+
38+ Update your settings to include:
39+
40+ .. code-block :: python
3441
3542 DEBUG_TOOLBAR_CONFIG = {
3643 " ROOT_TAG_EXTRA_ATTRS" : " hx-preserve"
@@ -39,7 +46,12 @@ In ``settings.py``, add::
3946 Hotwire Turbo
4047~~~~~~~~~~~~~
4148
42- In ``settings.py ``, add::
49+ The attribute `Turbo <https://turbo.hotwired.dev/ >`_ uses is
50+ `data-turbo-permanent <https://turbo.hotwired.dev/reference/attributes >`_
51+
52+ Update your settings to include:
53+
54+ .. code-block :: python
4355
4456 DEBUG_TOOLBAR_CONFIG = {
4557 " ROOT_TAG_EXTRA_ATTRS" : " data-turbo-permanent"
You can’t perform that action at this time.
0 commit comments