更改“使用CTRL-BREAK退出服务器”。

问题描述 投票:1回答:1

当使用“python manage.py runserver”时,是否有一种方法可以在其中一个Django脚本中将CTRL + BREAK退出命令更改为其他命令?

python django python-3.x
1个回答
0
投票

你可以使用psgrep来找到这个过程:

ps aux | grep runserver 

然后杀死它:

kill the_pid

我的意思是你可以将它写入shell脚本,然后调用它。

© www.soinside.com 2019 - 2024. All rights reserved.