From 31a99fa4e0af0ade1a1af72a2602cd36458629a3 Mon Sep 17 00:00:00 2001 From: Xevion Date: Sun, 19 Jan 2020 17:14:48 -0600 Subject: [PATCH] add shell context processor for flask commandline quick access --- app/templates/base.html | 0 wsgi.py | 12 ++++++++++++ 2 files changed, 12 insertions(+) create mode 100644 app/templates/base.html diff --git a/app/templates/base.html b/app/templates/base.html new file mode 100644 index 0000000..e69de29 diff --git a/wsgi.py b/wsgi.py index 7194028..1eb4e62 100644 --- a/wsgi.py +++ b/wsgi.py @@ -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")