From abdf1b4258873e4e90e233e60072d4ea333dcfe5 Mon Sep 17 00:00:00 2001 From: skimrme Date: Sat, 11 Apr 2026 02:03:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E7=AB=A0=E6=9C=80?= =?UTF-8?q?=E5=90=8E=E4=BF=AE=E6=94=B9=E6=97=A5=E6=9C=9F=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E4=B8=94=E5=87=86=E5=A4=87=E8=BD=AC=E5=90=91=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=EF=BC=8C=E5=B9=B6=E9=9D=9E=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E7=9A=84=E6=83=B3=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/docs.py | 9 +-------- blueprint/blog_views.py | 7 ++++++- static/new_page/home.html | 33 +++++++++++++++++++++++++++++++++ templates/blog/posts.html | 2 ++ 4 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 static/new_page/home.html diff --git a/api/docs.py b/api/docs.py index 8ace5d0..2f6dd21 100644 --- a/api/docs.py +++ b/api/docs.py @@ -4,11 +4,4 @@ docs_api = Blueprint('/api/docs', __name__) @docs_api.get("/") def home(): - return """ -

其实我最开始是想用fastapi的.....

..... -
-
- 查询日志 -
- https://ww3.tw/api/s/get/logs/ - """ \ No newline at end of file + return "123" \ No newline at end of file diff --git a/blueprint/blog_views.py b/blueprint/blog_views.py index 400ce44..d41e8a1 100755 --- a/blueprint/blog_views.py +++ b/blueprint/blog_views.py @@ -197,4 +197,9 @@ def paint(): @blog_bp.route('/paint/upload/', methods=['POST',]) def paint_upload(): if request.method == "POST": - return "POST" \ No newline at end of file + return "POST" + +@blog_bp.route('/new_page/') +@blog_bp.route('/new_page//') +def new_page(page_name=None): + return send_from_directory(os.path.join(current_app.static_folder, 'new_page'), f'{page_name}.html') diff --git a/static/new_page/home.html b/static/new_page/home.html new file mode 100644 index 0000000..497db5c --- /dev/null +++ b/static/new_page/home.html @@ -0,0 +1,33 @@ + + + + + + Document + + + + + + + \ No newline at end of file diff --git a/templates/blog/posts.html b/templates/blog/posts.html index 14af4f0..eb06da2 100755 --- a/templates/blog/posts.html +++ b/templates/blog/posts.html @@ -20,6 +20,8 @@


+ 最后修改时间: 【{{ posts['update_time'].replace('.', '-') }}】 +

留言区: