Skip to main content

Setting Up a Database Engine

The database engine the Django ORM will use needs to be configured in the project's configuration file myproject/settings.py. By default, the command used in the first chapter to create the project configures an SQLite database called db.sqlite3. So, in settings.py you will find this:

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}

For the moment this configuration is suitable for us. In the last chapter we will see how to change it to use MySQL.