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 %}