diff options
Diffstat (limited to 'pyenc/db.py')
-rw-r--r-- | pyenc/db.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pyenc/db.py b/pyenc/db.py index ea7cc14..3bf2bba 100644 --- a/pyenc/db.py +++ b/pyenc/db.py @@ -7,21 +7,24 @@ from flask import current_app, g from flask.cli import with_appcontext from .model import db + @with_appcontext def init_db(): db.create_all() + @click.command('init-db') @with_appcontext def init_db_command(): """ """ # init_db() - #print(db) + # print(db) print(db) db.create_all() click.echo('Initialized the database.') + def init_app(app): # app.teardown_appcontext(close_db) db.init_app(app) |