I use a clode server to test my django small project , I type in manage.py runserver & ,and then I log out my cloude server ,I can visit mysite normally but when I reload my cloude server , I don't know how to stop the development server, I had to kill the process to stop it, is there anyway to stop the development?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Django __str__ returned non-string (type NoneType)
- Evil ctypes hack in python
The answer is findable via Google -- and answered in other forums. Example solution is available on the Unix & Linux StackExchange site.
To be explicit, you could do:
This will return the process and its respective PID, such as:
In this particular case, the PID is
7956
. Now just run this to stop it:And to be clear / address some of the comments, you have to do it this way because you're running the development server in the background (the
&
in your command). That's why there is no "built-in" Django stop option...As far as i know ctrl+c or kill process is only ways to do that on remote machine. If you will use Gunicorn server or somethink similar you will be able to do that using Supervisor.
You can Quit the server by hitting CTRL-BREAK.
One liner..
We can use the following command.
then we will get number of process running with PID, find our python server PID and Kill process.
For example:
From task manager you can end the python tasks that are running. Now run
python manage.py runserver
from your project directory and it will work.