Configuring the database
The default SQLite database engine and the database file name are specified in the games_service/games_service/settings.py Python file. In order to work with PostgreSQL 10.5 instead of SQLite for this example, replace the declaration of the DATABASES dictionary in this file with the following lines. The nested dictionary maps the database named default with the django.db.backends.postgresql database engine, the desired database name, and its settings. In this case, we will create a database named games.
Make sure you specify the desired database name in the value for the 'NAME' key and that you configure the user, password, host, and port based on the user you recently created and your PostgreSQL 10.5 configuration. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access