Skip to content

Commit 39fc758

Browse files
committed
Fix formatting issues
1 parent 0413b04 commit 39fc758

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

docs/configuration.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ Toolbar options
7272
The toolbar searches for this string in the HTML and inserts itself just
7373
before.
7474

75+
.. _IS_RUNNING_TESTS:
76+
7577
* ``IS_RUNNING_TESTS``
7678

7779
Default: ``"test" in sys.argv``

docs/installation.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,22 @@ option.
159159
7. Disable the toolbar when running tests (optional)
160160
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
161161

162-
If you're running tests in your project you shouldn't activate the toolbar. You can do this by adding another setting:
162+
If you're running tests in your project you shouldn't activate the toolbar. You
163+
can do this by adding another setting:
163164

164165
.. code-block:: python
165166
166167
TESTING = "argv" in sys.argv
167168
168169
if not TESTING:
169-
INSTALLED_APPS = [*INSTALLED_APPS, "debug_toolbar"]
170-
MIDDLEWARE = ["debug_toolbar.middleware.DebugToolbarMiddleware", *MIDDLEWARE]
170+
INSTALLED_APPS = [
171+
*INSTALLED_APPS,
172+
"debug_toolbar",
173+
]
174+
MIDDLEWARE = [
175+
"debug_toolbar.middleware.DebugToolbarMiddleware",
176+
*MIDDLEWARE,
177+
]
171178
172179
You should also modify your URLconf file:
173180

@@ -179,6 +186,8 @@ You should also modify your URLconf file:
179186
path("__debug__/", include("debug_toolbar.urls")),
180187
]
181188
189+
Alternatively, you can check out the :ref:`IS_RUNNING_TESTS <IS_RUNNING_TESTS>`
190+
option.
182191

183192
Troubleshooting
184193
---------------

0 commit comments

Comments
 (0)