diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-18 02:19:11 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-18 02:19:11 +0200 |
commit | 0e36ceca6bee19474a98e64ef2cbdf78373e5ca8 (patch) | |
tree | 2064910d5ea4d0bb8302dd6025dee024ef628d80 /pyenc/db.py | |
parent | Add direnv .envrc file. (diff) | |
download | puppet-classifier-0e36ceca6bee19474a98e64ef2cbdf78373e5ca8.tar.gz puppet-classifier-0e36ceca6bee19474a98e64ef2cbdf78373e5ca8.tar.xz |
Fix pycodestyle.
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) |