The database configuration is in settings. in The py file, open this file and find DATABASES. The ENGINE tells Django which database ENGINE is used. Common DATABASES include PostgreSQL, MySQL, sqllite3, and oracle, however, no matter which database server you choose to use, you must download and install the corresponding database adaptation.
The database configuration is in settings. in The py file, open this file and find DATABASES. The ENGINE tells Django which database ENGINE is used. Common DATABASES include PostgreSQL, MySQL, sqllite3, and oracle, however, no matter which database server you choose to use, you must download and install the corresponding database adaptation.
The database configuration is in the settings. py file, open this file and find DATABASES,
Specifically, the ENGINE tells Django which database ENGINE is used. Common databases include PostgreSQL, MySQL, sqllite3, and oracle. However, no matter which database server is used, you must download and install the corresponding database adapter.
"NAME" indicates the NAME of the database. In the figure, the NAME of the database is django. "USER" tells Django which USER is used to connect to the database, and "PASSWORD" tells Django the PASSWORD for connecting to the USER, the HOST tells Django which database server is connected. If the database uses SQLite, the user, password, and host fields can be blank.
After the configuration is complete, enter the interactive interpreter interface through python manage. py shell and enter the following commands to test your Database Configuration:
From django. db import connection
Cursor = connection. cursor ()
If no error information is displayed, your database configuration is correct. Otherwise, you must check the error information to correct the error. common error information, as shown in: