From 4ef580b0cb37b8f2d9581963b1a64425e57b32b0 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 30 Aug 2009 21:27:32 +0200 Subject: [PATCH] Fix torrent site. --- www/pages/torrent/__init__.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/www/pages/torrent/__init__.py b/www/pages/torrent/__init__.py index 3490bc78..112e63b7 100644 --- a/www/pages/torrent/__init__.py +++ b/www/pages/torrent/__init__.py @@ -9,6 +9,7 @@ import urllib2 from client.bencode import bencode, bdecode import web +import web.elements class TrackerInfo: def __init__(self, url): @@ -58,9 +59,9 @@ for file in os.listdir(TORRENT_BASE): tracker = TrackerInfo(TRACKER_URL) -class TorrentBox(web.Box): +class TorrentBox(web.elements.Box): def __init__(self, file): - web.Box.__init__(self, file.name, file.get_hash()) + web.elements.Box.__init__(self, file.name, file.get_hash()) self.w("""

Seeders: %s
@@ -73,8 +74,8 @@ class TorrentBox(web.Box): class Content(web.Content): - def __init__(self, name): - web.Content.__init__(self, name) + def __init__(self): + web.Content.__init__(self) def content(self): self.w("

IPFire Torrent Tracker

") @@ -82,4 +83,6 @@ class Content(web.Content): b = TorrentBox(t) self.w(b()) -Sidebar = web.Sidebar +page = web.Page() +page.content = Content() +page.sidebar = web.elements.Sidebar() -- 2.47.3