diff --git a/ppt_manager/app.py b/ppt_manager/app.py index c945666..b6a121a 100644 --- a/ppt_manager/app.py +++ b/ppt_manager/app.py @@ -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('/') diff --git a/ppt_manager/templates/index.html b/ppt_manager/templates/index.html index e8a6c73..7a75ca6 100644 --- a/ppt_manager/templates/index.html +++ b/ppt_manager/templates/index.html @@ -44,10 +44,12 @@