From 0e257373816ee365d41e78b0b13ba807e0230aac Mon Sep 17 00:00:00 2001 From: Lan Hui <1348141770@qq.com> Date: Sun, 26 Mar 2023 20:56:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=96=87=E7=AB=A0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E6=96=87=E7=AB=A0=E5=88=97=E8=A1=A8=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E6=AF=8F=E7=AF=87=E6=96=87=E7=AB=A0=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E5=9C=A8=E5=86=85=E5=AE=B9=E9=83=A8=E5=88=86=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=A0=87=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin_service.py | 1 + app/templates/admin_manage_article.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/admin_service.py b/app/admin_service.py index 30d622f..1899002 100644 --- a/app/admin_service.py +++ b/app/admin_service.py @@ -57,6 +57,7 @@ def article(): _articles = get_page_articles(_cur_page, _page_size) for article in _articles: # 获取每篇文章的title article.title = article.text.split("\n")[0] + article.content = ''.join(article.text.split("\n")[1:]) context = { "article_number": _article_number, diff --git a/app/templates/admin_manage_article.html b/app/templates/admin_manage_article.html index a856182..e324b71 100644 --- a/app/templates/admin_manage_article.html +++ b/app/templates/admin_manage_article.html @@ -76,7 +76,7 @@ Level:{{text.level }} Date:{{ text.date }} -

{{ text.text }}

+

{{ text.content }}

{% endfor %}