diff --git a/app.py b/app.py index d429237..b620aca 100644 --- a/app.py +++ b/app.py @@ -21,12 +21,13 @@ def to_pinyin(text): # 拼接成字符串 return "_".join([item[0] for item in pinyin_list]) +app = Flask(__name__) +app.secret_key = 'your-secret-key-here' + @app.template_filter('to_pinyin') def jinja2_to_pinyin(text): return to_pinyin(text) -app = Flask(__name__) -app.secret_key = 'your-secret-key-here' # 数据库配置 db_config = {