Skip to content

Commit 545e2b6

Browse files
committed
增加热门文章的数量
1 parent 38c19a4 commit 545e2b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/blog/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_context_data_all(**kwargs):
8585
comment.body = comment.body[:LENGTH_IN_RIGHT_INDEX + 1] + '...'
8686
kwargs['recent_comment'] = recent_comment
8787
hot_article = Article.objects.filter(
88-
status='p').order_by('-weight', '-created_time')[:5]
88+
status='p').order_by('-weight', '-created_time')[:10]
8989
for article in hot_article:
9090
if len(article.title) > LENGTH_IN_RIGHT_INDEX:
9191
article.title = article.title[:LENGTH_IN_RIGHT_INDEX + 1] + '...'

0 commit comments

Comments
 (0)