How to 'clear' the port when restarting django runserver

前端 未结 19 2185
盖世英雄少女心
盖世英雄少女心 2020-12-12 11:23

Often, when restarting Django runserver, if I use the same port number, I get a \'port is already in use\' message. Subsequently, I need to increment the port number each t

19条回答
  •  误落风尘
    2020-12-12 11:54

    I use pkill -If 'manage.py' (-I means interactive, -f matches more than just the process name). See How to kill all processes with a given partial name? for more info on pkill.

提交回复
热议问题