How can I host my django project on my pc for someone to see it outside my WIFI network

219 views
Skip to first unread message

joseenoc...@gmail.com

unread,
Dec 23, 2020, 12:46:22 PM12/23/20
to Django users
Can some one pls explain what steps show I follow to host my django project on my pc and allow anyone outside my network WIFI to see the webiste

ule...@gmail.com

unread,
Dec 23, 2020, 2:47:41 PM12/23/20
to Django users
Hi,
You can use https://pythonanywhere.com and create a free account or https://eu.pythonanywhere.com...
How to put your site on pythonanyhere is explained  on following tutorial https://help.pythonanywhere.com/pages/DeployExistingDjangoProject/
samples :
task application : see https://ulefr03.eu.pythonanywhere.com/
or donation : see https://ulefr03.eu.pythonanywhere.com/donatie
or address application : see https://ulefr01.pythonanywhere.com/
or budget application : see https://ulefr02.eu.pythonanywhere.com/schema
Op woensdag 23 december 2020 om 18:46:22 UTC+1 schreef joseenoc...@gmail.com:

Kasper Laudrup

unread,
Dec 23, 2020, 4:02:47 PM12/23/20
to django...@googlegroups.com
You don't want to do that, but just in case:

You probably want to ensure that you have a static IP from your internet
provider. If you don't have that or for some reason cannot get one,
consider looking into dynamic DNS so you have a well known DNS name when
your public IP address changes.

Configure your router to forward requests on the port where your Django
website is running to the IP of your PC.

But you seriously don't want to do that. Look into how to deploy your
website instead.

Kind regards,

Kasper Laudrup

Benny M

unread,
Dec 23, 2020, 4:37:12 PM12/23/20
to django...@googlegroups.com
I’m going to second Kasper on this. There’s enough affordable options out there that self hosting to a “safe enough” degree would be the more expensive route to go.

I did this myself for a little while - had a makeshift cloud service for myself right up until I had a dev-ops friend take a look. His little giggles and eye-rolls were enough to convince me that I was wholly out of my league.

It’s a fun idea, but if you’re going to do it right, it’s not going to be cheap and it’s still not going to be secure enough to keep your network from being compromised.

> On Dec 23, 2020, at 3:02 PM, Kasper Laudrup <lau...@stacktrace.dk> wrote:
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/90d7384c-e6ea-4485-60da-3a57c0cd3707%40stacktrace.dk.

Mai Elshiashi

unread,
Dec 23, 2020, 6:22:10 PM12/23/20
to django...@googlegroups.com
If you're looking for a tool to allow anyone to see your project running on localhost. There's a cool tool called Ngrok Which exposes your localhost to  be public with a secure tunnel.Check it out. 
https://ngrok.com/ 


Shazia Nusrat

unread,
Dec 23, 2020, 6:27:00 PM12/23/20
to Django users
Ngrok will help you publish your site for development if you need to show your work remotely. Remember you need to run two terminals on terminal 1 you will run your project as you normally do and on other terminal you need to run ngrok. It will provide you with couple of URLs one for http and another for https. Https is usually if you need to test it with social authentication etc. 

Hope this helps. 

Cheers

Shazia Nusrat

unread,
Dec 23, 2020, 6:28:29 PM12/23/20
to Django users
You also need to add your url provided by Ngrok to your Django settings.py "ALLOWED_HOSTS". Only then it will present your site on that URL. 

Anselme Gildas Tchassem Boutchouang

unread,
Dec 23, 2020, 7:57:45 PM12/23/20
to django...@googlegroups.com
Cool, thanks



--
Anselme Gildas TCHASSEM BOUTCHOUANG
DevOps, Fullstack, Freelance
(+237) 696 319 191 / (+237) 698 544 992 / Email : aanseg...@yahoo.fr / LinkedIN : Profil LinkedIN / Facebook : Profil Facebook  / Whatsapp: (+237) 696 319 191
Reply all
Reply to author
Forward
0 new messages