Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

flask shell context processor

from app import app, db
from app.models import User, Post

@app.shell_context_processor
def make_shell_context():
    return {'db': db, 'User': User, 'Post': Post}
Source by blog.miguelgrinberg.com #
 
PREVIOUS NEXT
Tagged: #flask #shell #context #processor
ADD COMMENT
Topic
Name
4+6 =