catapam / investnest

Project 04 - Code Institute
1 stars 2 forks source link

[TASK 1.2.3] Configure the database connection in settings.py #119

Closed catapam closed 1 month ago

catapam commented 2 months ago

Configure the Django settings.py file to establish a connection with the selected SQL database for the project.

Acceptance Criteria:

Steps:

  1. Open the settings.py file and configure the DATABASES setting.
  2. Ensure that the correct database engine (MySQL/PostgreSQL) is specified.
  3. Install any necessary database drivers using pip.
  4. Test the connection by running python manage.py migrate to ensure Django can connect to the database.
  5. Document the configuration process.

Linked Issues:

Next task:
Previous task:
catapam commented 1 month ago

Database used is external connection with a Code Institute Postgress setup. Commit

Error encountered during initial migrate:

django.db.utils.OperationalError: ERROR:  Endpoint ID is not specified. Either please upgrade the postgres client library (libpq) for SNI support or pass the endpoint ID (first part of the domain name) as a parameter: '?options=endpoint%3D<endpoint-id>'. See more at https://neon.tech/sni
ERROR:  connection is insecure (try using sslmode=require)