Wednesday, October 18, 2017

Re: hello everyone! I'm working on Django Framework. but when I run the script $ ./manage.py runserver or $./manage.py runserver 0.0.0.0:8000 it only work on my system. how to make it public? so that I can access it from other systems too... [ without

Hi,

That is a bit outside of django.

1. First of all, you shouldn't run django with runserver on a production system. runserver is just for development purposes, and doesn't do a lot of optimization that you get when running it "correctly".
2. You need to be on a computer that is accessible from the Internet - so you will need to configure your router to be able to allow access from the outside (not django related at all).
3. If you want to run something that is publicly accessible, you need to run on port 80 - you don't access netflix from www.netflix.com:8000 ;-)

I would suggest that you checkout the following tutorials:

And finally a tutorial on how to setup an ubuntu 16.04 server for serving django:

Best regards,

Andréas

2017-10-18 8:42 GMT+02:00 Uddipta Poddar <iamudi03@gmail.com>:

hello everyone! 


I'm working on Django Framework. but when I run the script


$ ./manage.py runserver 

or 

ALLOWED_HOSTS = ['127.0.0.1']  # in settings.py

$./manage.py runserver 0.0.0.0:8000 


it only works on my system.


how to make it public? so that I can access it from other systems too... 
[ without deploying on heroku]


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e8ea988a-2cdc-4dca-a534-c41d5952dee5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK4qSCdKU8Te%3DH2SUmPQMsLh0Ox64wTXpo1fGQ1ujyi9r%2BuYoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment