File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,12 @@ def main() -> None:
1010
1111 from django .conf import settings
1212
13- if settings .DEBUG :
14- if os .environ .get ("RUN_MAIN" ) or os .environ .get ("WERKZEUG_RUN_MAIN" ):
15- import debugpy
13+ if settings .DEBUG and os .environ .get ("RUN_MAIN" ) or os .environ .get ("WERKZEUG_RUN_MAIN" ):
14+ import debugpy
1615
17- # Use "nosec" inline comment to ignore security check because this doesn't run in production
18- debugpy .listen (("0.0.0.0" , 5678 )) # nosec
19- print ("Debugpy attached!" )
16+ # Use "nosec" inline comment to ignore security check because this doesn't run in production
17+ debugpy .listen (("0.0.0.0" , 5678 )) # nosec
18+ print ("Debugpy attached!" )
2019
2120 try :
2221 from django .core .management import execute_from_command_line
You can’t perform that action at this time.
0 commit comments