I'm developing a Django-powered blog, with two versions: a desktop version and a mobile I optimized version for when it is accessed through a mobile device.
Now, I'm trying to test it on my Samsung phone to see how it would look and act like when someone uses it through a mobile phone's browser [iPhone, Android, etc.]
Instructions I found online (such as this one: ) say that I should plug the phone to the computer through a USB and run: manage.py runser 0.0.0.0:8000 and visit this IP address via my phone's browser. But it doesn't work and instead returns an error:
"Oops! Google Chrome could not connect to 0.0.0.0:8000"
What am I missing in the setup? What are other, if any, alternative ways of testing my Django app on my phone during development?
Thank you for your time and help.
Sincerely,
Muhammad
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/47bac303-2b53-4f9d-bd93-acbc1d4f1b09%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/47bac303-2b53-4f9d-bd93-acbc1d4f1b09%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20131209130815.323c8fd8%40bigbox.christie.dr.
For more options, visit https://groups.google.com/groups/opt_out.
I suggest setting up a URL using no-ip.org or similar service. No-ip.org is free at this level and works great, at least on Ubuntu and CentOS. I haven't tried other OS's.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJK1Jg1XHcgYjzW6-1w%3DqUnJtVn1US9vAWLUiVABHd5nbH_Z4A%40mail.gmail.com.
Hello,
I'm very sorry for the delay in letting you both know how it worked out for me.
I first tried Cook's method and signed up for the NO-IP service. But for some reason, I could not reach my local server from my phone's browser using the URL that I created there. (But I could access the URL from the computer and it showed the app I was working on.)
So, I kept looking for more solutions like it, especially since I want to be able to connect to my computer even when I am on a different network (library, cafe, etc.).
I came across LocalTunnel and ngrok (with which the former was being integrated and merged with). But it didn't work out for me. Maybe it's made for a different platform (I work on Windows.)
At this point, using additional info I had gathered from the web, I went into my Firewall settings and setup a new rule to open up port 80 for TCP.
I then tried the NO-IP service again, but it didn't work.
Again, I kept looking...
And Portmap and PageKite came into view.
And, since PageKite.net's solution was a single Python script that I had to run on my computer and then try to access my local server from the URL that I set up (e.g. example.pagekite.me), I gave it a try.
I then executed "manage.py runserver 0.0.0.0:80" on the command line (in my Django project's directory)
It worked when I accessed the local server from both the web and my phone. "Ah," I thought, "the world is right again!" :)
Now, I am back to developing and testing both versions (mobile and web) of my site simultaneously.
Thank you both for the help and resources pointed out. (And my apologies for the long silence.)
I wish you both all the best. :)
Sincerely,
Muhammad
//On the terminal type the below line.
sudo python manage.py runserver 0.0.0.0:80
//type your password
//on your phone you only need to open the browser and on the search bar input the network's ip address (both devices should be connected to the same network)
Voila!