How can I see the Django development server in VMWare?

后端 未结 3 847
轮回少年
轮回少年 2021-02-04 12:40

I am trying to connect to a Django development server, running in OS X localhost:8000, from VMWare running Windows.

I\'ve tried various combinations of settings, but no

3条回答
  •  不思量自难忘°
    2021-02-04 13:37

    • In VMWare, set the network of the VM to "Connect directly to the physical network (Bridged)", rather than "Share this Mac's network connection (NAT)"
    • Find the IP address of the Mac itself on the network the Mac itself is on (not the private network VMWare sets up). This can be found using ifconfig, or in System Preferences > Network. Let's say it's 192.168.1.2.
    • Start the Django development server on that IP address: python manage.py runserver 192.168.1.2:8000
    • In VMWare, connect to the Django site at http://192.168.1.2:8000

提交回复
热议问题