A simple flask app with web interface
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
536 B

from app import create_app, db
from app.models import User
app = create_app()
@app.shell_context_processor
def make_shell_context():
"""
Make the following easily accessible from 'flask shell'
For instance:
|--$ flask shell
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
App: spark [production]
Instance: /home/user/app/instance
>>> user = User.query.first()
>>> print(user)
<User johnwhite>
"""
return {"db": db, "User": User}