0
0
Fork 0

管理文章页面的文章列表中,每篇文章不再在内容部分重新显示标题。

Alpha
Lan Hui 2023-03-26 20:56:08 +08:00
parent b3b154a24f
commit 0e25737381
2 changed files with 2 additions and 1 deletions

View File

@ -57,6 +57,7 @@ def article():
_articles = get_page_articles(_cur_page, _page_size) _articles = get_page_articles(_cur_page, _page_size)
for article in _articles: # 获取每篇文章的title for article in _articles: # 获取每篇文章的title
article.title = article.text.split("\n")[0] article.title = article.text.split("\n")[0]
article.content = ''.join(article.text.split("\n")[1:])
context = { context = {
"article_number": _article_number, "article_number": _article_number,

View File

@ -76,7 +76,7 @@
<small>Level:{{text.level }}</small> <small>Level:{{text.level }}</small>
<small>Date:{{ text.date }}</small> <small>Date:{{ text.date }}</small>
</div> </div>
<p style="padding-top: 5px;" class="mb-1">{{ text.text }}</p> <p style="padding-top: 5px;" class="mb-1">{{ text.content }}</p>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>