fix: change project struct
This commit is contained in:
10
base/__init__.py
Normal file
10
base/__init__.py
Normal 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
5
base/database.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
|
||||
|
||||
def init_db(app):
|
||||
db = SQLAlchemy(app)
|
||||
Reference in New Issue
Block a user