1
votes

Steps to reproduce the problem:

  1. Open 1st project.
  2. py manage.py runserver (now I can see my Project_1 website in browser by address http://127.0.0.1:8000/).
  3. CLOSE project in PyCharm and open another project.
  4. Execute py manage.py runserver after opening 2nd project.
  5. Refresh tab in browser... And WTF? I still see my 1st project page while I am already close it, opened another project and even RUNSERVER on 2th project.

I MUST see on tab http://127.0.0.1:8000/ new project webpage after runserver, but it does not work.

Is it PyCharm bug or something else? I am using PyCharm Pro with the latest updates.

1

1 Answers

2
votes

On Windows:

  1. Open CMD
  2. Run command netstat -o to get list of running processes with open ports.
  3. Find the development server process by its address (for example http://127.0.0.1:8000/). You need to remember PID number.
  4. Run command Taskkill /PID #### /F(for example Taskkill /PID 26356 /F) to kill the process. Where #### is your running development server PID number.
  5. Enjoy! Now the server is not running anymore after the PyCharm was closed.

On linux:

django development server, how to stop it when it run in background