# Find the name of the author
author = self.get_account(news.author_id)
if author:
- news.author = author.cn
+ news.author = author.name
else:
_ = self.locale.translate
news.author = _("Unknown author")
return self.render("news-item.html", item=news)
-
-
-class NewsAuthorHandler(BaseHandler):
- """
- This page displays information about the news author.
- """
- def get(self, author):
- author = self.get_account(author)
- if not author:
- raise tornado.web.HTTPError(404)
-
- latest_news = self.news.get_latest(author=author.uid,
- locale=self.locale, limit=10)
-
- self.render("news-author.html",
- author=author, latest_news=latest_news)