]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blobdiff - webapp/ui_modules.py
Some more minor fixes
[people/shoehn/ipfire.org.git] / webapp / ui_modules.py
index 1a0eb769d9204260896ac0c010694371460c97ca..47673ee712f0877ddfffc5548733f76e58f0c58e 100644 (file)
@@ -13,7 +13,7 @@ import tornado.locale
 import tornado.web
 import unicodedata
 
-from tornado.database import Row
+import backend
 
 class UIModule(tornado.web.UIModule):
        @property
@@ -113,7 +113,7 @@ class FireinfoGeoTableModule(UIModule):
                                other_countries.append(name)
                                continue
 
-                       country = tornado.database.Row({
+                       country = backend.database.Row({
                                "code"  : code,
                                "name"  : name,
                                "value" : value,
@@ -201,7 +201,7 @@ class NewsItemModule(UIModule):
                # Get name of author
                author = self.accounts.find(author)
                if author:
-                       return author.cn
+                       return author.name
                else:
                        _ = self.locale.translate
                        return _("Unknown author")
@@ -214,7 +214,7 @@ class NewsItemModule(UIModule):
                        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)
@@ -346,7 +346,7 @@ class TrackerPeerListModule(UIModule):
                                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):