Merge pull request #414 from hongweipeng/fix_rss

修复RSS订阅里会展示草稿文章的问题
pull/12/head
且听风吟 6 years ago committed by GitHub
commit edb14e4d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -36,7 +36,7 @@ class DjangoBlogFeed(Feed):
return get_user_model().objects.first().get_absolute_url()
def items(self):
return Article.objects.order_by('-pk')[:5]
return Article.objects.filter(type='a', status='p').order_by('-pub_time')[:5]
def item_title(self, item):
return item.title

Loading…
Cancel
Save