How to setup Django app on EC2 instance (AWS) – Part 2

Hosting django on AWS ec2

In the previous part of article we completed the environment setup to host the Django app on EC2 instance of AWS.

How to setup Django app on EC2 instance (AWS) – Part 1.

Hosting Django Apps on PythonAnyWhere server for free. Step by step guide.

In this article we will start from where we left in last part.

Database initialisation:

Activate the virtual environment.
source venv/bin/activate

Make migrations.
python makemigrations

If you get a message –  No changes detected then make sure migration files from development environment are not present. If still same message is received, mention the name of app with makemigration command.

python makemigrations app1 app2 teachers students

python migrate

Load initial data from fixtures if any.
python loaddata dummy_inital_data

Try to run the server just to check if everything is fine.
python runserver


— Article will be updated soon for next steps —

(Visited 435 times, 1 visits today)

You must read this :

1 thought on “How to setup Django app on EC2 instance (AWS) – Part 2”

Leave a Reply

Your email address will not be published. Required fields are marked *