|
@@ -14,9 +14,10 @@ from app.data.QueryManager import QueryManager, display_mapper
|
|
|
from app.palette import iter_palettes, solarized
|
|
|
|
|
|
try:
|
|
|
- from db_credentials import HOST, PASSWORD
|
|
|
+ from db_credentials import USER, HOST, PASSWORD
|
|
|
host = f'host={HOST}'
|
|
|
password = f'password={PASSWORD}'
|
|
|
+ user = f'user={USER}'
|
|
|
except:
|
|
|
host = ''
|
|
|
password = ''
|
|
@@ -25,8 +26,7 @@ try:
|
|
|
import os
|
|
|
|
|
|
import psycopg
|
|
|
- user = os.getenv('USER')
|
|
|
- conn: Cursor = psycopg.connect(f"{host} dbname=grocery user={user} {password}")
|
|
|
+ conn: Cursor = psycopg.connect(f"{host} dbname=grocery {user} {password}")
|
|
|
cur = conn.cursor()
|
|
|
except:
|
|
|
print('Failed to set up db connection. Entering Mock mode')
|