making django server accessible in LAN

前端 未结 3 1590
野趣味
野趣味 2020-12-04 20:49

I have installed django server and it can be accessible as below

http://localhost:8000/get-sms/
http://127.0.0.1:8000/get-sms/

suppose My i

3条回答
  •  猫巷女王i
    2020-12-04 21:46

    Running the Django Development Server
    This is what you're looking for. To help you further, here is what you should do:

    python manage.py runserver 0.0.0.0:8000
    

    By the way, this may be a duplicate of this question.

    Here is what the documentation says:

    Note that the default IP address, 127.0.0.1, is not accessible from other machines on your network. To make your development server viewable to other machines on the network, use its own IP address (e.g. 192.168.2.1) or 0.0.0.0.

提交回复
热议问题