Tim Chase's answer works well for a now and then test. But many static IPs change every 24 hours or so. Plus you will probably want to do this many more times in the future as well as ask others to test it on various devices. .
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. HTH, Tim On Mon, Dec 9, 2013 at 5:08 PM, Tim Chase <django.us...@tim.thechases.com>wrote: > On 2013-12-09 10:44, Muhammad Ali wrote: > > 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" > > The "runserver 0.0.0.0:8000" tells Django to listen on all interfaces > you have. You'd have to determine the IP address of your server > (well, dev machine). Usually you can get this from the output of > "ifconfig -a" (or "ipconfig /all" on Win32). It will usually return > something like 192.168.x.y > > Depending on how you're tethered, you want to point your phone to > that address: > > http://192.168.3.14:8000/ > > Some tethering forces the phone to appear outside your network, > preventing it from seeing the private/internal 192.168.x.y > addresses. This complicates matters, as you'd have to adjust your > router/NAT to open port 8000 (or port 80 for that matter) and point > it at your box internally. You'd then have to visit your site via > your external IP address. So you it might look something like > > phone > | > v > internet > | > v > router 123.45.67.89 > | > | configure router NAT to listen on 80 > | and forward internally > | to 192.168.x.y on port 8000 > v > computer 192.168.x.y listening on port 8000 > > You can find your external IP address by just googling for it: > > https://www.google.com/search?q=my+IP+address > > which includes the answer before the other actual search results. > Once you have that external address, you can use > > http://123.45.67.89/ > > to access it (note that if you forward 8000-to-8000 instead of > 80-to-8000, you'd have to specify the port as :8000 in the URL) > > -tkc > > > > -- > 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+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@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. > -- MLHIM VIP Signup: http://goo.gl/22B0U ============================================ Timothy Cook, MSc +55 21 94711995 MLHIM http://www.mlhim.org Like Us on FB: https://www.facebook.com/mlhim2 Circle us on G+: http://goo.gl/44EV5 Google Scholar: http://goo.gl/MMZ1o LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@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/CA%2B%3DOU3XHtgPfxtekctdCMUKive2-4u1HBahxcWvUgZWtJQfHsg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.