Modifying the settings.py file

There is one thing we have to change here. In the settings.py file, there is a list called ALLOWED_HOSTS, which was empty when we created the Django project. We will need to add the IP address of the EC2 that we are deploying the application to; in my case, it would be:

ALLOWED_HOSTS=["35.176.16.157"]

We also need to change the ORDER_SERVICE_BASEURL that we defined at the end of the file. It needs to be the address of the instance that we are going to deploy to the order service. In my case, the IP is 35.176.194.15, so my variable will look like this:

ORDER_SERVICE_BASEURL = "http://35.176.194.15"

We are going to create a folder to keep the application since it is not a good idea to keep the application running ...

Get Python Programming Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.