add shell context processor for flask commandline quick access

This commit is contained in:
Xevion
2020-01-19 17:14:48 -06:00
parent d56c05c75e
commit 31a99fa4e0
2 changed files with 12 additions and 0 deletions

0
app/templates/base.html Normal file
View File

12
wsgi.py
View File

@@ -1,4 +1,16 @@
from app import app, db
from app.models import Season, Episode, Section, Quote
@app.shell_context_processor
def make_shell_context():
return {
'db' : db,
'Season' : Season,
'Episode' : Episode,
'Section' : Section,
'Quote' : Quote
}
if __name__ == "__main__":
app.run(host="0.0.0.0")