I am building a Flask application using app factory pattern. If I install BPython on my virtualenv, and use the shell, it seems like it cannot get the app context, and therefore when I try to do something like:
>> Role.query.all()
I get a RuntimeError:
application not registered on db instance and no application bound to current context
I have to use create the app context and do it like this:
with app.app_context():
...
do stuff
However, if I use IPython, it works fine. In the docs it says it's ready for both BPython and IPython so I don't know why it's not creating the app context.