0
votes

I wanted to acess the web page that i did in django in all devices(mobile and desktop) connected in my network, i tried:

  1. just python manage.py runserver and acess the http://127.0.0.1:8000/ given by the console. The chrome of my mobile gives me "connection refused"
  2. put the ip in ALLOWED_HOST and python manage.py runserver my_ip:8000 my_ip is the number of my ip that the https://www.whatismyip.com/ gives me.
  3. python manage.py runserver 0:8000, it gives me [Errno 11001] getaddrinfo failed

what can i do?

1
Are you on windows? - Edwin Cruz
Yes, i'm on Windows 10 - Vitor Figueredo Marques
Press windows key + r then type in cmd. In the command promt type ipconfig which will give you your ipv4. That is what you can type in to your ALLOWED_HOSTS in the settings.py. Then to run the server just run the comman python manage.py runserver my_ip:8000 - Edwin Cruz
It gives you that error when you run the ipconfig? Or when you try to run the server? - Edwin Cruz
IPV4 worked for me, thanks a lot dude - Vitor Figueredo Marques

1 Answers

0
votes

Try this:

ALLOWED_HOSTS = ['*']