microblog2/microblog.py

12 lines
300 B
Python
Raw Permalink Normal View History

from app import create_app, db, cli
2017-11-13 07:53:18 +00:00
from app.models import User, Post, Message, Notification
2017-09-11 21:30:21 +00:00
app = create_app()
cli.register(app)
2017-09-11 21:30:21 +00:00
@app.shell_context_processor
def make_shell_context():
2017-11-13 07:53:18 +00:00
return {'db': db, 'User': User, 'Post': Post, 'Message': Message,
'Notification': Notification}