Error during template rendering

https://8000-devapp01-port-a31746a2dff64351.labsError Link.kodekloud.com/

I’m afraid that’s not very helpful. These addresses are reaped at the end of a lab session.

Apologies for giving short information.

when i tried to execute the project mercury application, i am facing below error;

ProgrammingError at /
relation “portfolios_portfolios” does not exist
LINE 1: …".“image”, “portfolios_portfolios”.“summary” FROM “portfolio…
^
Request Method: GET
Request URL: http://8000-devapp01-port-a31746a2dff64351.labs.kodekloud.com/
Django Version: 2.2.6
Exception Type: ProgrammingError
Exception Value:
relation “portfolios_portfolios” does not exist
LINE 1: …”.“image”, “portfolios_portfolios”.“summary” FROM "portfolio…
^
Exception Location: /usr/local/lib/python3.6/dist-packages/django/db/backends/utils.py in _execute, line 84
Python Executable: /usr/bin/python3
Python Version: 3.6.9
Python Path:
[‘/opt/caleston-code/mercuryProject’,
‘/usr/lib/python36.zip’,
‘/usr/lib/python3.6’,
‘/usr/lib/python3.6/lib-dynload’,
‘/usr/local/lib/python3.6/dist-packages’,
‘/usr/lib/python3/dist-packages’]
Server time: Wed, 17 Jan 2024 18:49:00 +0000

Is this the last lab in the course?

yes, it is last lab in Linux basics course. At the end of error page i am seeing below message:

You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False , and Django will display a standard page generated by the handler for this status code.

can you please tell me how to change the Django settings file?

Hello ,

I have updated the DEBUG = FALSE in settings.py file.
Now I am facing a new error like Server error

please try to help me resolve this issue.

I assume you are at question 15, which reads

Great! Everything should now be in order to restart the application.

and that you completed all the previous steps successfully. If you missed any step or could not complete it correctly, then it will not work here.

You should be the root user here (saves typing sudo for every command).

sudo -i
cd /opt/caleston-code/mercuryProject
source ../venv/bin/activate
python3 manage.py migrate
python3 manage.py runserver 0.0.0.0:8000

After these commands it should print

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
January 18, 2024 - 05:02:44
Django version 2.2.6, using settings 'mercury.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.

Then access the application…

Thank you for helping me in resolving this error.

Now I am in last step of accesing web application, But i am facing gateway error now.

In the last step, I have configured mercury.service file and tried to access the web application .but it is not accessible

it says 502 bad gateway error. please help me fix this issue.

i tried clearing out cache, disabled all my extensions. Looks lke it is not accessing the server.

please help me in fixing this bug ASAP.

I have resolved the issue by restarting the browser and an entire Lab. I have executed each and every step again. I am able to access Project mercury web application now

Thank you for assisting me on this.