46π
I had the same question on a Windows computer, and started the Django server with python manage.py runserver 192.168.1.146:80
, instead of the 0.0.0.0. (I used a different IP address of course).
After that, a Windows Firewall dialog popped up and asked if I should unblock the port (yes). Other computers in the LAN could then access the Django server using 192.168.1.146:80.
11π
In order for it to work for me, I ran sudo python manage.py runserver 0.0.0.0:80
in terminal (Mac OS X 10.8.2), and then in your ipad (or iphone) browser, go to http://[your ip address]/. I didnβt have to do this: Testing Django website on iphone
- [Django]-Import data from excel spreadsheet to django model
- [Django]-_() or {% trans %} in Django templates?
- [Django]-AccessDenied when calling the CreateMultipartUpload operation in Django using django-storages and boto3
6π
When running it from Ubuntu, it said permission denied when I tried to do this:
python manage.py runserver 0.0.0.0:80
Since it was a permission issue the following worked just fine like Ryan and gtujan said.
sudo python manage.py runserver 0.0.0.0:80
NOTE: that you are running a server on port 80, which is a HTTP Port. So when typing the URL from your web-browser you do not necessarily need to type β:80β in your URL.
http://192.168.1.146:80/
The following should suffice. Even if you do type β:80β it is considered the same.
http://192.168.1.146/
However for other port numbers such as 8000 etc, :8000 is required to be part of the URL.
- [Django]-Django β Understanding X-Sendfile
- [Django]-Django testing: Test the initial value of a form field
- [Django]-Django column "name" of relation "django_content_type" does not exist
2π
Sounds like it is a firewall issue then. Did you make sure to open port 80 on your server computer?
- [Django]-How should I write tests for Forms in Django?
- [Django]-How to obtain a QuerySet of all rows, with specific fields for each one of them?
- [Django]-How can I call a custom Django manage.py command directly from a test driver?
0π
From your mention of forwarding port 80, it sounds like your second computer is on a different network (router) from the one running Django. In that case, you should browse to the IP of the Django networkβs router β the 192.168 address is only visible from behind that router, and port forwarding will ensure that your request goes to the right machine.
- [Django]-ChoiceField in Django model
- [Django]-Django Unique Together (with foreign keys)
- [Django]-How can I disable logging while running unit tests in Python Django?
0π
what OS are you running this on?
have you tried to give the command root privileges? (assuming youβre running it on ubuntu/linux)
try running this instead:
sudo python manage.py runserver 0.0.0.0:80
- [Django]-Can I Make a foreignKey to same model in django?
- [Django]-Django excluding specific instances from queryset without using field lookup
- [Django]-How to auto insert the current user when creating an object in django admin?
- [Django]-Django ORM and locking table
- [Django]-ManyRelatedManager not Iterable. Think I'm trying to pull my objects out incorrectly
- [Django]-Including a querystring in a django.core.urlresolvers reverse() call
0π
Iβve tried:
python3 ./manage.py runserver_plus LAN.LAN.LAN.LAN:8010
But can get an HTTP 200 reply without a path:
http://LAN.LAN.LAN.LAN:8010/
If remote client do a GET request with a path :
http://LAN.LAN.LAN.LAN:8010/login
VPN.CLIENT - - [30/Aug/2023 15:31:35] "GET /favicon.ico HTTP/1.1" 404 -
VPN.CLIENT - - [30/Aug/2023 15:31:45] "GET /login/ HTTP/1.1" 200 -
VPN.CLIENT - - [30/Aug/2023 15:31:48] "GET /login/ HTTP/1.1" 200 -
I can see the request is reaching the server but client just wait forever for the reply that never came.
The most crazy thing is both server and client can reach each other i.e. ssh works.
Django version 4.2.3
[SOLVED] telling ovpn server to use TCP instead of UDP
- [Django]-How does django handle multiple memcached servers?
- [Django]-Using Basic HTTP access authentication in Django testing framework
- [Django]-Django β get() returned more than one topic
-6π
As far as I understand, 0.0.0.0 is a non-routable IP.
It will only work on the local machine, if you bind a socket to the address.
- [Django]-Override default queryset in Django admin
- [Django]-ImportError: No module named django_filters
- [Django]-How to create a custom decorator in Django?