本文整理匯總了Python中web.controllers.ArticleController.count_by_feed方法的典型用法代碼示例。如果您正苦於以下問題:Python ArticleController.count_by_feed方法的具體用法?Python ArticleController.count_by_feed怎麽用?Python ArticleController.count_by_feed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類web.controllers.ArticleController
的用法示例。
在下文中一共展示了ArticleController.count_by_feed方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: feeds
# 需要導入模塊: from web.controllers import ArticleController [as 別名]
# 或者: from web.controllers.ArticleController import count_by_feed [as 別名]
def feeds():
"Lists the subscribed feeds in a table."
art_contr = ArticleController(g.user.id)
return render_template('feeds.html',
feeds=FeedController(g.user.id).read(),
unread_article_count=art_contr.count_by_feed(readed=False),
article_count=art_contr.count_by_feed())
示例2: user
# 需要導入模塊: from web.controllers import ArticleController [as 別名]
# 或者: from web.controllers.ArticleController import count_by_feed [as 別名]
def user(user_id=None):
"""
See information about a user (stations, etc.).
"""
user = UserController().get(id=user_id)
if user is not None:
article_contr = ArticleController(user_id)
return render_template('/admin/user.html', user=user, feeds=user.feeds,
article_count=article_contr.count_by_feed(),
unread_article_count=article_contr.count_by_feed(readed=False))
else:
flash(gettext('This user does not exist.'), 'danger')
return redirect(redirect_url())