Skip to content

Commit

Permalink
Add initdb cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Jan 7, 2018
1 parent 8987747 commit 88379e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app.py
Expand Up @@ -14,8 +14,10 @@ def add_header(resp):
resp.headers['Cache-Control'] = 'no-store'
resp.headers['Pragma'] = 'no-cache'
return resp

with app.app_context():
db.create_all()
else:
app = create_app()


@app.cli.command()
def initdb():
db.create_all()

0 comments on commit 88379e7

Please sign in to comment.