Skip to main content

has_app_context

Test if an app context is active. Unlike :func:has_request_context this can be true outside a request, such as in a CLI command.

def has_app_context() - > bool

Test if an app context is active. Unlike :func:has_request_context this can be true outside a request, such as in a CLI command.

Returns

TypeDescription
boolTrue if an app context is active, otherwise False.