[config] Connect with pymysql on Windows

This commit is contained in:
Ferdinand Thiessen 2021-03-25 01:19:37 +01:00
parent 6cf33976b3
commit 05aba1161b
1 changed files with 2 additions and 1 deletions

View File

@ -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"],