1
votes

I have finished coding a Django App. In that app I have created two models in order to record some project information. Also I am showing project locations with markers on a map (OpenStreetMap) by using leaflet.js.

I will use this app only by starting an offline server like "python manage.py runserver". I am using "Firefox" to display the django app.

I really wonder if somehow the information that I keep in my django models or the markers on the OpenStreetMap is somehow reachable by others via on Firefox or leaflet.

Thank you very much in advance.

2

2 Answers

3
votes

If you are in the same wi-fi network you can run python manage.py runserver 0.0.0.0:8000 and then your application will be visible for everybody by typing http://your-pc-up:8000

If you want to make it public you have to buy domain (or register free domain) and put it in your vpc / free hosting. There are plenty of tutorial out there which show how to host an application.

This tutorial is really easy and straight forward: http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/

1
votes

You can use ngrok service which gives you domain such as https://c2757c5f.ngrok.io and other users can visit it by accessing this url. In addition, this url can be visited from anywhere!

See more details by visiting here

If you want other users can visit you website from you local server, then you can run manage.py runserver 0.0.0.0:8000. Your app is visible to other users on same network by accessing this http://your-ip:8000/

You could know you ip by using ifconfig command on linux or ubuntu