quick script to test stuff via flask shell
This commit is contained in:
parent
a7244942ed
commit
ab97ef4b44
14
tmp.py
Normal file
14
tmp.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
from flask import Flask
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite://"
|
||||||
|
app.config["SQLALCHEMY_ECHO"] = True
|
||||||
|
|
||||||
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
|
from the_works.models import Base
|
||||||
|
db = SQLAlchemy(model_class=Base)
|
||||||
|
|
||||||
|
db.init_app(app)
|
||||||
|
|
||||||
|
with app.app_context():
|
||||||
|
db.create_all()
|
||||||
Loading…
Reference in New Issue
Block a user