From 05aba1161b6bd2b2ed19f9b35008618a9c19d9a3 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 25 Mar 2021 01:19:37 +0100 Subject: [PATCH] [config] Connect with pymysql on Windows --- flaschengeist/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flaschengeist/config.py b/flaschengeist/config.py index 089dab9..ed74470 100644 --- a/flaschengeist/config.py +++ b/flaschengeist/config.py @@ -66,7 +66,8 @@ def configure_app(app, test_config=None): app.config["SECRET_KEY"] = config["FLASCHENGEIST"]["secret_key"] if test_config is None: - app.config["SQLALCHEMY_DATABASE_URI"] = "mysql://{user}:{passwd}@{host}:{port}/{database}".format( + app.config["SQLALCHEMY_DATABASE_URI"] = "mysql{driver}://{user}:{passwd}@{host}:{port}/{database}".format( + driver="+pymysql" if os.name == "nt" else "", user=config["DATABASE"]["user"], passwd=config["DATABASE"]["password"], host=config["DATABASE"]["host"],