9 from .handlers
import *
10 from .ui_modules
import *
12 BASEDIR
= os
.path
.join(os
.path
.dirname(__file__
), "..")
14 tornado
.locale
.load_translations(os
.path
.join(BASEDIR
, "translations"))
15 tornado
.options
.enable_pretty_logging()
17 class Application(tornado
.web
.Application
):
20 # Entry sites that lead the user to index
22 (r
"/[A-Za-z]{2}/?", MainHandler
),
24 (r
"/[A-Za-z]{2}/index", IndexHandler
),
25 (r
"/[A-Za-z]{2}/news", NewsHandler
),
26 (r
"/[A-Za-z]{2}/builds", BuildHandler
),
27 (r
"/[A-Za-z]{2}/translations?", TranslationHandler
),
29 (r
"/[A-Za-z]{2}/downloads?", DownloadHandler
),
30 (r
"/[A-Za-z]{2}/downloads?/all", DownloadAllHandler
),
31 (r
"/[A-Za-z]{2}/downloads?/development", DownloadDevelopmentHandler
),
32 (r
"/[A-Za-z]{2}/downloads?/torrents", DownloadTorrentHandler
),
34 (r
"/api/cluster_info", ApiClusterInfoHandler
),
35 # Always the last rule
36 (r
"/[A-Za-z]{2}/(.*)", StaticHandler
),
40 cookie_secret
= "aXBmaXJlY29va2llc2VjcmV0Cg==",
43 static_path
= os
.path
.join(BASEDIR
, "static"),
44 template_path
= os
.path
.join(BASEDIR
, "templates"),
46 "Build" : BuildModule
,
48 "MenuItem" : MenuItemModule
,
49 "NewsItem" : NewsItemModule
,
50 "ReleaseItem" : ReleaseItemModule
,
51 "SidebarBanner" : SidebarBannerModule
,
52 "SidebarItem" : SidebarItemModule
,
53 "SidebarRelease" : SidebarReleaseModule
,
57 tornado
.web
.Application
.__init
__(self
, handlers
, **settings
)