python-fun icon indicating copy to clipboard operation
python-fun copied to clipboard

RuntimeError: Working outside of application context

Open jancovic opened this issue 2 years ago • 1 comments

Hi

I was checking web app FLASK https://github.com/patrickloeber/python-fun/tree/master/webapps/flask

But I got this error:

RuntimeError: Working outside of application context.

This typically means that you attempted to use functionality that needed
the current application. To solve this, set up an application context
with app.app_context(). See the documentation for more information.

jancovic avatar Mar 25 '23 23:03 jancovic

Hi, Just change db.create_all() on with app.app_context(): db.create_all()

sergchan avatar Mar 30 '23 22:03 sergchan