File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 99db_host = os .getenv ("DB_HOST" , "localhost" )
1010db_name = os .getenv ("DB_NAME" , "classclock" )
1111
12+ connection_url = f'mysql+mysqlconnector://{ db_username } :{ db_password } @{ db_host } /{ db_name } ?charset=utf8mb4&collation=utf8mb4_general_ci'
13+ db_connection_string = os .getenv ("DB_CONNECTION_URL" , connection_url )
1214
15+ db_connection_string = os .getenv ("DATABASE_URL" , connection_url )
1316
14- db_connection_string = os .getenv ("DB_CONNECTION_URL" ,
15- 'mysql+mysqlconnector://{user}:{pw}@{url}/{db}?charset=utf8mb4&collation=utf8mb4_general_ci' .format (
16- user = db_username ,
17- pw = db_password ,
18- url = db_host ,
19- db = db_name
20- )
21- )
2217# elif sys.argv[1] == "demo":
2318# # https://stackoverflow.com/a/46541219
2419# with app.app_context():
You can’t perform that action at this time.
0 commit comments