Download:
child 246:f31fc5c409e1
parent 244:62252030324f
245:19950999005a
Anton Shestakov <av6@dwimlabs.net>, Wed, 26 Oct 2016 07:38:07 +0800
viewer: use handlers module as a namespace

1 файлов изменено, 7 вставок(+), 8 удалений(-) [+]
viewer.py file | annotate | diff | comparison | revisions
--- a/viewer.py Wed Oct 26 07:33:36 2016 +0800
+++ b/viewer.py Wed Oct 26 07:38:07 2016 +0800
@@ -7,8 +7,7 @@
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
@@ -17,12 +16,12 @@
def __init__(self, debug=False):
project_re = r'/([.a-z0-9_-]+)/([^/]+)/([^/]+)'
handlers = [
- (r'/', IndexHandler),
- (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})
]
settings = dict(
static_path=rel('static'),