fix: change project struct

This commit is contained in:
Zhaolong
2022-01-25 22:57:24 +08:00
parent 3be9b86fff
commit da9965e2ae
10 changed files with 166 additions and 19 deletions

10
base/__init__.py Normal file
View File

@@ -0,0 +1,10 @@
from flask_sqlalchemy import SQLAlchemy
from base import database
db = SQLAlchemy()
def init_app(app):
global db
db = database.init_db(app)

5
base/database.py Normal file
View File

@@ -0,0 +1,5 @@
from flask_sqlalchemy import SQLAlchemy
def init_db(app):
db = SQLAlchemy(app)