manage.py runserver

前端 未结 8 1390
情话喂你
情话喂你 2020-11-28 22:36

I am running python manage.py runserver from a machine A when I am trying to check in machine B The url I typed is http://A:8000/ I am getting an error like The system retu

8条回答
  •  青春惊慌失措
    2020-11-28 22:48

    You can run it for machines in your network by

    ./manage.py runserver 0.0.0.0:8000

    And than you will be able to reach you server from any machine in your network. Just type on other machine in browser http://192.168.0.1:8000 where 192.168.0.1 is IP of you server... and it ready to go....

    or in you case:

    1. On machine A in command line ./manage.py runserver 0.0.0.0:8000
    2. Than try in machine B in browser type http://A:8000
    3. Make a sip of beer.

    Source from django docs

提交回复
热议问题