From: Michael Tremer Date: Sun, 17 Jan 2010 11:17:04 +0000 (+0100) Subject: Add handlers for other sites. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5cf160e027644962ce03c6c91e91116491a7a983;p=ipfire.org.git Add handlers for other sites. --- diff --git a/www/webapp/__init__.py b/www/webapp/__init__.py index 659f7698..25b2326e 100644 --- a/www/webapp/__init__.py +++ b/www/webapp/__init__.py @@ -55,3 +55,32 @@ class Application(tornado.web.Application): xsrf_cookies = True, ) tornado.web.Application.__init__(self, handlers, **settings) + + # ipfire.org + self.add_handlers("ipfire.org", [ + (r"/", tornado.web.RedirectHandler, { "url" : "http://www.ipfire.org" }) + ]) + + # download.ipfire.org + self.add_handlers("download.ipfire.org", [ + (r"/", MainHandler), + (r"/[A-Za-z]{2}/index", DownloadHandler), + ]) + + # source.ipfire.org + self.add_handlers("source.ipfire.org", [ + (r"/", MainHandler), + (r"/[A-Za-z]{2}/index", SourceHandler), + ]) + + # torrent.ipfire.org + self.add_handlers("torrent.ipfire.org", [ + (r"/", MainHandler), + (r"/[A-Za-z]{2}/index", DownloadTorrentHandler), + ]) + + # tracker.ipfire.org + self.add_handlers("tracker.ipfire.org", [ + (r"/", MainHandler), + (r"/[A-Za-z]{2}/index", DownloadTorrentHandler), + ])