Webservices¶
Hosting and serving web applications typically involves setting up a few additional components. A few common items are noted here to help you get started.
Environments¶
If you want to host your Django app, you need to choose a method through which it will be hosted. There are a few free services that you can use to do this such as Heroku and PythonAnyWhere.
Another good option is DigitalOcean, which is notoriously easy to use and offers a number of affordable hosting plans. If you’re interested in trying out DigitalOcean we have a referral link from them that will give you $200 in credit over 60 days.
WSGI¶
A common method for serving Python web applications involves using a Web Server Gateway Interface (WSGI) package.
Gunicorn is a great choice for a WSGI server. They have detailed documentation and installation instructions on their website.
Serving static files¶
There are numerous ways to host static files for your Django application. One extremely easy way to do this is by using WhiteNoise, a python package designed to make it possible to serve static files from just about any web application.