Skip to content

Commit ef758d9

Browse files
committed
also avoid debug for dumpdata and loaddata
1 parent a1de41e commit ef758d9

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

cc_legal_tools/settings/dev.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,16 @@
3737
new_value = "INVALID_VARIABLE(%s)"
3838
TEMPLATES[0]["OPTIONS"]["string_if_invalid"] = new_value # noqa: F405
3939

40-
if "publish" not in sys.argv and "test" not in sys.argv:
41-
# 1) We don't want debug output in published files
42-
# 2) The Django Debug Toolbar can't be used with tests
40+
if (
41+
"dumpdata" not in sys.argv
42+
and "loaddata" not in sys.argv
43+
and "publish" not in sys.argv
44+
and "test" not in sys.argv
45+
):
46+
# 1) "dumpdata": avoid the Django Debug Toolbar when dumping data
47+
# 2) "loaddata": avoid the Django Debug Toolbar when loading data
48+
# 3) "publish": avoid debug output in published files
49+
# 4) "test": the Django Debug Toolbar can't be used with tests:
4350
# HINT: Django changes the DEBUG setting to False when running tests.
4451
# By default the Django Debug Toolbar is installed because DEBUG is
4552
# set to True. For most cases, you need to avoid installing the

0 commit comments

Comments
 (0)