django - run project from PyCharm server not accessible

二次信任 提交于 2019-12-08 02:11:45

问题


When I run my django server from PyCharm it is not accessible from the outside world.

I read that you can run in the cmd like that, and it works.

python manage.py runserver 0.0.0.0:8000

How do I run it to be accessible to the outside world from PyCharm?

I need to run it from there is order to debug.

thanks!


回答1:


At the upper-right corner (by default) of PyCharm you can edit the configuration for your server:

In there specify as host 0.0.0.0.

Don't forget to take care of your firewall/NAT by opening and forwarding the appropriate ports.



来源:https://stackoverflow.com/questions/30422421/django-run-project-from-pycharm-server-not-accessible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!