20 lines
380 B
Python
20 lines
380 B
Python
from .config import (
|
|
DB_URL,
|
|
POSTGRES_DB,
|
|
POSTGRES_HOST,
|
|
POSTGRES_PASSWORD,
|
|
POSTGRES_PORT,
|
|
POSTGRES_USER,
|
|
)
|
|
|
|
db_credentials = {"conninfo": DB_URL}
|
|
|
|
if not DB_URL:
|
|
db_credentials = {
|
|
"host": POSTGRES_HOST,
|
|
"port": POSTGRES_PORT,
|
|
"dbname": POSTGRES_DB,
|
|
"user": POSTGRES_USER,
|
|
"password": POSTGRES_PASSWORD,
|
|
}
|