PyDev and Django: how to restart dev server?

前端 未结 7 1525
一向
一向 2020-12-06 00:53

I\'m new to Django. I think I\'m making a simple mistake.

I launched the dev server with Pydev:

RClick on project >> Django >> Custom comman

相关标签:
7条回答
  • 2020-12-06 01:20

    By default, the runserver command runs in autoreload mode, which runs in a separate process. This means that PyDev doesn't know how to stop it, and doesn't display its output in the console window.

    If you run the command runserver --noreload instead, the auto-reloader will be disabled. Then you can see the console output and stop the server normally. However, this means that changes to your Python files won't be effective until you manually restart the server.

    0 讨论(0)
  • 2020-12-06 01:31

    Run the project 1. Right click on the project (not subfolders) 2. Run As > Pydev:Django

    Terminate 1. Click terminate in console window

    The server is down

    0 讨论(0)
  • 2020-12-06 01:31

    Solution: create an interpreter error in some project file. This will cause the server to crash. Server can then be restarted as normal.

    0 讨论(0)
  • 2020-12-06 01:31

    If you operate on Windows using the CMD: Quit the server with CTRL+BREAK.

    python manage.py runserver localhost:8000
    
    0 讨论(0)
  • 2020-12-06 01:32

    I usually run it from console. Running from PyDev adds unnecessary confusion, and doesn't bring any benefit until you happen to use PyDev's GUI interactive debugging.

    0 讨论(0)
  • 2020-12-06 01:35

    you can quit by clicking Ctrl+ Pause keys. Note that the Pause key might be called Break and in some laptops it is made using the combination Fn + F12. Hope this might helps.

    0 讨论(0)
提交回复
热议问题