简体   繁体   中英

How to expose Django/Python application to the web?

I developed a simple Django/Python poll application(Following step by step tutorial from the Django Official Documentation). I used the in build server to test the application. Now, I want to host my application in the web. I heard WSGI is the best way to expose Python/Django application to the web? What would be the best way to expose Python/Django code into the web? Thank you

PS: I already have a domain name and a shared web hosting from justhost.com. While I chat to their support, they told me that they support WSGI.

I'd go for Heroku . They have a free usage quota, and a really nice deployment mechanism. Here's a nice article describing how to use it: https://devcenter.heroku.com/articles/django

Easiest way to do that is to find a host online (such as pythonanywhere.com) to host your app on there, following their instructions, and your app will be online. They handle most of the issues with piggybacking a django project on a server.

You need a HTTP server program like Apache or NGINX to serve your http requests. There will be a module like fastCGI or the better WSGI to interact with your python scripts/environment. These HTTP server programs and databases will be on a web host machine that you can rent that also provides static IPs and domain name resolution. For Django I can highly recommend WebFaction , they support it and have good documentation . You will probably also need to register a domain name via a registrar if you dont want to use the sample subdomain provided by your web host.

Update: for justhost, see this related question .

部署如何在文档列表中支持部署django的方法。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM