def count_article(self): Article = app.article.models.Article return self.articles.outerjoin(Article).filter(Article.access=="public").count()