microblog2/microblog.py

12 lines
300 B
Python

from app import create_app, db, cli
from app.models import User, Post, Message, Notification
app = create_app()
cli.register(app)
@app.shell_context_processor
def make_shell_context():
return {'db': db, 'User': User, 'Post': Post, 'Message': Message,
'Notification': Notification}