Task 8 question 11

I’m struggling to figure out why I cannot get through this part of the Lab – Troubleshoot the Development Environment. I’m stuck on question 11 and need assistance. I know I’m missing something simple.

Hi @justynlucas4

I notice that the solution to this lab is missing. I’ll get it done this weekend and let you know.

Awesome! I thought something was off with that. I had to ask my buddy for help on it and figured it out. I can’t quite remember what the solution was but I’ll figure it out today.

thank you!

@justynlucas4 So that’s the task to fix the postgres configuration, right?

Assuming you are in directory /opt/caleston-code/mercuryProject, do the following…

For this, we need to first find the file we need to edit, so we’re going to use find to find files and use grep to find the specific text, with the -l switch to print the file path the text was found in.

find . -type f -exec grep -l 'DATABASES = {' "{}" \;

Edit the file that was returned by the above

vi ./mercury/settings.py

Scroll down to DATABASES = { and beneath this set the correct host and port. Save and exit.

Note that you determined the correct port in an earlier question.