该代码应在应用程序上下文中运行。添加
with app.app_context()
@async def send_async_email(msg): with app.app_context(): mail.send(msg)
上一篇 Python urllib2基本身份验证问题
下一篇 垂直连接两个NumPy数组
版权所有 (c)2021-2022 MSHXW.COM
ICP备案号:晋ICP备2021003244-6号