Setting up PostgreSQL with a Django project
Django integrates SQLite3 for initial development purposes out of the box, which helps developers get started with their projects without the hassle of initial database setup. In our case, we used SQLite3 in Chapter 1. However, it is a file-based database that is not recommended to be used in production since it cannot scale.
Instead, we shall use PostgreSQL as our choice of database to work with Django throughout this book. Since it is always recommended to keep your local development environment as close to the production environment as possible, we shall set up PostgreSQL for our local development.
Important note
You can use other supported databases such as MySQL, MariaDB, and Oracle (https://docs.djangoproject.com/en/stable/ref/databases/#databases) by just making a small change in the settings file. But please remember that not all databases support all the ORM functionalities, so if you are using another database, check the...