authorization working

parent c542e353
Showing with 6 additions and 4 deletions
config = { # Database configuration
'SQLALCHEMY_DATABASE_URL': "mysql+pymysql://webapp:Ej]mMiSZCr7)BzAp@localhost/webapp"
}
\ No newline at end of file
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from config import config
# Database configuration
SQLALCHEMY_DATABASE_URL = "mysql+pymysql://webapp:Ej]mMiSZCr7)BzAp@localhost/webapp"
engine = create_engine(SQLALCHEMY_DATABASE_URL)
engine = create_engine(config['SQLALCHEMY_DATABASE_URL'])
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Base = declarative_base()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment