No application found. Either work inside a view function or push an application context.

1 min


Error solution No application found. Either work inside a view function or push an application context

An error occurs when working with a context: you have defined a context, but it is not visible in functions. In this case, inside the function, use:

For example:

def analyze_brent_oil(self):
with app.app_context():
if selfbrent_oil_current:
t1 = self.__ yesterday()
t2 = self.__ maximum()
t3 = self.__ last_month()


0 Comments

Leave a Reply