File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 37
37
new_value = "INVALID_VARIABLE(%s)"
38
38
TEMPLATES [0 ]["OPTIONS" ]["string_if_invalid" ] = new_value # noqa: F405
39
39
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:
43
50
# HINT: Django changes the DEBUG setting to False when running tests.
44
51
# By default the Django Debug Toolbar is installed because DEBUG is
45
52
# set to True. For most cases, you need to avoid installing the
You can’t perform that action at this time.
0 commit comments