Configuring a Django Project to Use PostgreSQL
Django projects are configured by default to use a SQLite database, but the framework has built-in support for PostgreSQL as well, which is more suitable for production. If you haven't created your first Django project yet, see Creating and Setting Up a Django Project. Here's how to set up things to run your Django application with a PostgreSQL database.
First, make sure you have a PostgreSQL server running. The most quickly way to do this is via Docker. This command will launch a new container with a fresh PostgreSQL database:
docker run -p 5432:5432 --name oscardb -e POSTGRES_PASSWORD=postgres -d postgres