django - run project from PyCharm server not acces

2019-05-19 22:59发布

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条回答
狗以群分
2楼-- · 2019-05-19 23:42

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

PyCharm Edit Configuration for 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.

查看更多
登录 后发表回答