The problem of flask manually loading ctx into the stack

problem description

Why is it that after manually loading ctx into the stack, current_app still does not point to app

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)
from flask import Flask, current_app

app = Flask (_ _ name__)

ctx = app.app_context ()

ctx.push ()
a = current_app

what result do you expect? What is the error message actually seen?

the expected result is that an is the core object of flask and is actually still a local agent

Oct.29,2021

a = current_app._get_current_object()
Menu