making django server accessible in LAN

前端 未结 3 1589
野趣味
野趣味 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条回答
  •  臣服心动
    2020-12-04 21:29

    To add @Depado 's answer you may need to add your LAN IP address to ALLOWED_HOSTS in the settings.py along with localhost. it would look like,

    ALLOWED_HOSTS = ["localhost", "192.168.8.160"]
    

提交回复
热议问题