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