moriire commited on
Commit
d9f6ea4
1 Parent(s): 1b1f1b0

Update database.py

Browse files
Files changed (1) hide show
  1. database.py +3 -1
database.py CHANGED
@@ -1,9 +1,11 @@
1
  from sqlalchemy import create_engine
2
  from sqlalchemy.ext.declarative import declarative_base
3
  from sqlalchemy.orm import sessionmaker
 
4
 
 
5
  #SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db"
6
- SQLALCHEMY_DATABASE_URL = DATABASE_URL #"postgresql://user:password@postgresserver/db"
7
 
8
  engine = create_engine(
9
  SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
 
1
  from sqlalchemy import create_engine
2
  from sqlalchemy.ext.declarative import declarative_base
3
  from sqlalchemy.orm import sessionmaker
4
+ from .config import settings
5
 
6
+ #database = databases.Database(settings.db_url)
7
  #SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db"
8
+ SQLALCHEMY_DATABASE_URL = settings.db_url #"postgresql://user:password@postgresserver/db"
9
 
10
  engine = create_engine(
11
  SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}