Создание базы данных перенесено в основной код

This commit is contained in:
2021-07-17 15:21:54 +03:00
parent 37a158712b
commit 0931dbea89
2 changed files with 4 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
import os
import json
from flask import Flask
@@ -55,3 +56,6 @@ app.register_blueprint(main_blueprint)
from .mails import mails as mails_blueprint
app.register_blueprint(mails_blueprint)
if not os.path.exists(app.config["SQLALCHEMY_DATABASE_URI"]):
db.create_all(app=app)