Skip to main content

with_appcontext

Wraps a callback so that it's guaranteed to be executed with the script's application context.

def with_appcontext(
f: F
) - > F

Wraps a callback so that it's guaranteed to be executed with the script's application context.

Parameters​

NameTypeDescription
fFThe function to be wrapped and executed within an application context.

Returns​

TypeDescription
FThe original function f wrapped with the application context decorator.