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() - > boolean
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
| Type | Description |
|---|---|
boolean | True if an application context is currently active, allowing access to context proxies like current_app and g; otherwise False. |