1
0
Fork 0

fix: fix article title show

Alpha
吴宇涵 2023-03-25 20:41:09 +08:00
parent a220450b03
commit 99aa4e0990
1 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,10 @@ def article():
article_len = get_number_of_articles() article_len = get_number_of_articles()
context["article_number"] = article_len context["article_number"] = article_len
context["text_list"] = get_page_articles(_cur_page, _page_size) context["text_list"] = get_page_articles(_cur_page, _page_size)
_articles = get_page_articles(_cur_page, _page_size)
for article in _articles: # 获取每篇文章的title
article.title = article.text.split("\n")[0]
context["text_list"] = _articles
if request.method == "GET": if request.method == "GET":
try: try: