修复V1.0模板Jinja2 count过滤器Bug

This commit is contained in:
2026-05-29 14:26:06 +08:00
parent 8618867f92
commit 7a16efde9a
2 changed files with 8 additions and 2 deletions

View File

@@ -11,6 +11,10 @@ from loguru import logger
app = Flask(__name__)
app.config['JSON_AS_ASCII'] = False
@app.template_filter('count_item')
def count_item(lst, item):
return lst.count(item)
generator = PPTGenerator()
@app.route('/')