By default, Django uses the SQLite database. For production applications, you can use the PostgreSQL, MariaDB, Oracle, or MySQL databases. For this book, it will be PostgreSQL. Perform the following steps:
- The virtual environment is active; now, we will install the psycopg2 PostgreSQL adaptor with the help of the following command:
(venv) [root@ip-172-31-95-213 atmproject]# pip3 install psycopg2-binary
After the preceding command has been executed, the console should appear as follows:
Figure 4.6 – The psycopg2 PostgreSQL adapter
- Now, open the settings file of the project to declare the database's RDS endpoint from AWS along with the username, password, and database name, as follows:
(venv) [root@ip-172-31-95-213 atmproject]# vi atmproject/settings.py
------------------------------------------
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME...