Forums

connect postgres database by default

I made a connection to postgres remotely and migrated but after that my website doesn't work and when I remove the postgres connection to the sqlite connection my website is back to working What do I do to solve this problem as my database is outside of pythonanywhere and it is this database that I want to use for all my sites that are in pythonanywhere to avoid having to connect multiple postgres in my pgadmin

What kind of errors do you see in your logs when trying to connect to the Postgres database?

File "/home/funtenariaguivala/.virtualenvs/env/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 29, in <module> 2023-06-30 10:44:14,765: raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e) 2023-06-30 10:44:14,765: ******* 2023-06-30 10:44:14,765: If you're seeing an import error and don't know why, 2023-06-30 10:44:14,765: we have a dedicated help page to help you debug: 2023-06-30 10:44:14,765: https://help.pythonanywhere.com/pages/DebuggingImportError/ 2023-06-30 10:44:14,765: ******* 2023-06-30 10:44:15,464: Error running WSGI application 2023-06-30 10:44:15,464: django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2' 2023-06-30 10:44:15,465: File "/var/www/funtenariaguivala_pythonanywhere_com_wsgi.py", line 28, in <module> 2023-06-30 10:44:15,465: application = get_wsgi_application()

It looks like an import problem that should be solved by following https://help.pythonanywhere.com/pages/DebuggingImportError/