def has_app_context():
 return (_app_ctx_stack.top is not None)

def has_app_context ( ) : return ( _app_ctx_stack . top is not None )
works like :func:has_request_context but for the application context .