You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
from app import app, db
|
|
from flask import g, current_app
|
|
from flask_sqlalchemy import SQLAlchemy
|
|
|
|
if __name__ == "__main__":
|
|
def get_db():
|
|
if 'db' not in g:
|
|
g.db = SQLAlchemy(current_app)
|
|
return g.db
|
|
get_db().create_all()
|
|
#db.create_all() |