--- a/viewer.py Wed Oct 26 07:33:36 2016 +0800
+++ b/viewer.py Wed Oct 26 07:38:07 2016 +0800
from tornado.options import define, options
from tornado.web import Application
-from candolint import uimodules
-from candolint.handlers import IndexHandler, ProjectHandler, AtomHandler, CheckHandler, StatusHandler, ErrorHandler
+from candolint import handlers as h, uimodules
from candolint.models import database
from candolint.utils import rel
def __init__(self, debug=False):
project_re = r'/([.a-z0-9_-]+)/([^/]+)/([^/]+)'
- (project_re, ProjectHandler),
- (project_re + r'/atom', AtomHandler),
- (project_re + r'/(\d+|latest)(?:/(raw))?', CheckHandler),
- (project_re + r'/status\.svg', StatusHandler),
- (r'.*', ErrorHandler, {'status_code': 404})
+ (r'/', h.IndexHandler),
+ (project_re, h.ProjectHandler),
+ (project_re + r'/atom', h.AtomHandler),
+ (project_re + r'/(\d+|latest)(?:/(raw))?', h.CheckHandler),
+ (project_re + r'/status\.svg', h.StatusHandler),
+ (r'.*', h.ErrorHandler, {'status_code': 404})
static_path=rel('static'),