flask-site/install.py

10 lines
244 B
Python

from flask_site import *
def init_db():
with app.app_context():
with open('/home/billy/flask-site/schema.sql', 'r') as f:
g.db = connect_db()
g.db.execute(f.read())
if __name__ == "__main__":
init_db()