Skip to main content

has_request_context

Test if an app context is active and if it has request information.

def has_request_context() - > bool

Test if an app context is active and if it has request information.

Returns

TypeDescription
boolTrue if a request context is active and request/session proxies are available, otherwise False.