Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Working outside of application context #12

Open
jancovic opened this issue Mar 25, 2023 · 1 comment
Open

RuntimeError: Working outside of application context #12

jancovic opened this issue Mar 25, 2023 · 1 comment

Comments

@jancovic
Copy link

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.

@sergchan
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants