The development server for Django is acting very odd. The browser accessing it gets stuck on loading, and any attempt to quit it does not work. When I hit control c
it seems to quite, but in actuality is still running. The only way to make it quit is to restart my computer, which is very frustrating. Is there any way to force it to quit. I'm on a mac running mountain lion. Does anyone know the name of the processe it runs is called so I can force it to quit from activity monitor.
问问题
2266 次
2 回答
8
假设您用来运行 django 的命令是:
python manage.py runserver
你可以用以下方法杀死它:
pkill -f 'python manage.py runserver'
这比killall python
其他程序可能使用 python 好得多,这会杀死它们。
于 2015-06-05T09:06:57.317 回答
1
Django 在 Python 进程中运行(有时不止 1 个),你可以使用
killall python
或者,从活动监视器中,只需杀死其中包含 Python 的任何东西。不过,在一天结束时,manage.py runserver 命令只会创建一个新的(通常是按顺序编号的)Python 进程。唯一一次停止所有 python 进程可能是一个问题,如果您从计算机上运行超过 1 个 python 服务,在这种情况下,您可能需要编辑 django-admin.py 并查看让它创建一个命名进程。
于 2012-12-27T21:30:25.443 回答