I cannot access localhost / 0.0.0.0:8000 from any other device.
The current django project is built off of an older project I was playing around with last year where this worked. Unfortunately i've lost the previous project so I cannot compare their settings.py files, although there should be hardly any difference between them.
.
The setup
- Dropbox - holds project and sqlite database file
- Laptop - running server, had no changes over last year
- Desktop - /
- iPhone - /
.
Where the problem is
The fault must be on my laptop where the server is running because I cannot access the server on either my desktop nor my iPhone, the latter worked last year with the previous project, I did not have my desktop at the time.
.
The project's allowed hosts list
I've added several as i've been trying out different solutions recommended by others.
ALLOWED_HOSTS = [ '*', '0.0.0.0.', '0.0.0.0:8000', 'localhost' 'localhost:8000' '{laptop's IP address}', '{desktop's IPv4 address}', '{desktop's Default gateway}', ] .
When I try to access the localhost on desktop or iPhone
Nothing appears in the laptop's terminal, the quit server help line remains the last line. I remember last year, it would update with notifcations that something remotely was accessing the server.
On the desktop, Firefox tells me it's 'Unable to connect', Edge tells me 'localhost refused to connect' with a 'ERR_CONNECTION_REFUSED'.
On the iPhone, 'could not connect to the server'.
.
what I've tried in the other devices' URL address bar
- 0.0.0.0:8000
- localhost:8000
- localhost:8000/admin
- https://{laptop IP address}
.
.
Any help would be appreciated.