Skip to content
Advertisement

no such table: wagtailcore_site

I’m hosting two websites on ubuntu server and both having postgresql, the first one is working prefect but the second give me this error

no such table: wagtailcore_site Request Method: GET

Django Version: 2.2.10 Exception

Type: OperationalError Exception Value: no such table:

wagtailcore_site Exception

Location: /home/project2/.venv/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py

in execute, line 383 Python

Executable: /home/project2/.venv/bin/python3.7m Python Version: 3.7.3

database settings for first website:

JavaScript

database settings for second website:

JavaScript

from the error it seems that django try to run sqllite instead of postgresql, I dont know why !

Notes:

  • python manage.py migrate command working without any problem whith the second database.

  • SQL lite is working, the problem only with postgresql in the second project.

  • I’m using nginx and gunicorn.

I think the problem maybe with the HOST and PORT settings in both settings maybe they conflicting each other? ( I try change the port and host also but didn’t solve it)

thanks.

Advertisement

Answer

My bad, I have two gunicorn files for both websites and I was restarting gunicorn for first websites not the second one.

Which mean there is no errors in the code above.. The problem only in restarting gunicorn.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement