def teacher_texts(): """ Gets all the articles of this teacher """ articles = Article.own_texts_for_user(flask.g.user) article_info_dicts = [article.article_info_for_teacher() for article in articles] return json.dumps(article_info_dicts)
def own_texts(): r = [e.article_info() for e in Article.own_texts_for_user(flask.g.user)] return json_result(r)