[config] Connect with pymysql on Windows
This commit is contained in:
parent
6cf33976b3
commit
05aba1161b
|
@ -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"],
|
||||
|
|
Loading…
Reference in New Issue