greyli / helloflask

Hello, Flask!
https://docs.helloflask.com
MIT License
1.87k stars 2.53k forks source link

无法在python中直接使用escape #276

Closed sumaut closed 8 months ago

sumaut commented 1 year ago

https://github.com/greyli/helloflask/blob/dfce5025033317dd42291907338e3a5accb71196/demos/http/app.py#L14C20-L14C20

ImportError: cannot import name 'escape' from 'jinja2'

sumaut commented 1 year ago

from markupsafe import escape

hhhyyyqqq commented 9 months ago

我也又同样问题,请问解决了吗

greyli commented 8 months ago

修改 escape 的导入语句即可,详见示例