diff --git a/app.py b/app.py index f9631d8..1a0ec9b 100644 --- a/app.py +++ b/app.py @@ -83,6 +83,15 @@ def create_app(config_name='default'): return AdminModel.query.get(int(user_id)) return None + # ========== 文档路由 ========== + @app.route('/docs/') + def serve_doc(filename): + """服务文档文件""" + from flask import send_from_directory + import os + docs_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'docs') + return send_from_directory(docs_dir, filename) + # ========== 前台路由 ========== @app.route('/') def index(): diff --git a/templates/admin/apikey/list.html b/templates/admin/apikey/list.html index 933de83..0957962 100644 --- a/templates/admin/apikey/list.html +++ b/templates/admin/apikey/list.html @@ -1,6 +1,6 @@ {% extends 'admin/model/list.html' %} -{% block tail %} +{% block head_css %} {{ super() }} +{% endblock %} + +{% block list_cards %} +{{ super() }} + {% endblock %} \ No newline at end of file diff --git a/templates/admin/components/sidebar.html b/templates/admin/components/sidebar.html index 1455420..3877f40 100644 --- a/templates/admin/components/sidebar.html +++ b/templates/admin/components/sidebar.html @@ -47,6 +47,12 @@ 管理员 +