import tornado.web
import unicodedata
-from tornado.database import Row
+import backend
class UIModule(tornado.web.UIModule):
@property
other_countries.append(name)
continue
- country = tornado.database.Row({
+ country = backend.database.Row({
"code" : code,
"name" : name,
"value" : value,
# Get name of author
author = self.accounts.find(author)
if author:
- return author.cn
+ return author.name
else:
_ = self.locale.translate
return _("Unknown author")
item.text = item.text[:400] + "..."
# Render text
- item.text = textile.textile(item.text)
+ item.text = textile.textile(item.text.decode("utf8"))
return self.render_string("modules/news-item.html", item=item,
uncut=uncut, announcement=announcement, show_heading=show_heading)
peer["hostname"] = ""
return self.render_string("modules/tracker-peerlist.html",
- peers=[Row(p) for p in peers])
+ peers=[backend.database.Row(p) for p in peers])
class WishlistModule(UIModule):