Пример #1
0
 def get_news_count(self):
     return Article.on(self).filter(
         pub_date__lte=datetime.now(),
         published=True,
     ).count()