mirror of
https://github.com/Xevion/the-office.git
synced 2025-12-10 12:08:52 -06:00
add shell context processor for flask commandline quick access
This commit is contained in:
0
app/templates/base.html
Normal file
0
app/templates/base.html
Normal file
12
wsgi.py
12
wsgi.py
@@ -1,4 +1,16 @@
|
|||||||
from app import app, db
|
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__":
|
if __name__ == "__main__":
|
||||||
app.run(host="0.0.0.0")
|
app.run(host="0.0.0.0")
|
||||||
|
|||||||
Reference in New Issue
Block a user