Django

Django

Django is a free and open-source Python-based web framework. It follows the model–template– views architectural pattern and allows rapid development.

Packages Included

Package Version License
Django 2.2.12 Custom
Postgres 12 Postgres SQL
Gunicorn 20.0.4 MIT
Nginx 1.18.0 Custom


Getting started after deploying

In addition to the package installation, the Django stack image will also:

  1. Create a Django helloworld application. After an instance is created, you can use its public IPv4 address to see the helloworld application live. The application will be located in the /home/django/helloworld/ directory.

  2. Enable the UFW firewall to allow only SSH (port 22), HTTP (port 80), and HTTPS (port 443) access.



Run the Django application

  1. Clone the Django code wherever you want
  2. Create database users according to your requirement
  3. Edit Gunicorn's configuration and point it to /etc/systemd/system/gunicorn.service
  4. Update Nginx by editing /etc/nginx/sites-enabled/default