def get_url_specs(): url_specs = [ (r"/", SmartDestServlet), (r"favicon.*", NullRequestHandler), (CreateRequestBookmarkletHandler.url, CreateRequestBookmarkletHandler), (CheckSitesBookmarkletHandler.url, CheckSitesBookmarkletHandler), (r"/login", LoginHandler), (r"/logout", LogoutHandler), ] for servlet in ( APIServlet, ChecklistServlet, ChecklistToggleServlet, RequestServlet, RequestsServlet, NewRequestServlet, PickMeRequestServlet, UnpickMeRequestServlet, AddRequestServlet, RemoveRequestServlet, VerifyRequestServlet, DiscardRequestServlet, DelayRequestServlet, UndelayRequestServlet, CommentRequestServlet, PingMeServlet, PushServlet, PushesServlet, EditPushServlet, DiscardPushServlet, DeployPushServlet, BlessPushServlet, LivePushServlet, NewPushServlet, PushItemsServlet, PushByRequestServlet, UserListServlet, SummaryForBranchServlet, MsgServlet, ): url_specs.append(get_servlet_urlspec(servlet)) return url_specs
def get_url_specs(): url_specs = [ (r'/', SmartDestServlet), (r'favicon.*', NullRequestHandler), (CreateRequestBookmarkletHandler.url, CreateRequestBookmarkletHandler), (CheckSitesBookmarkletHandler.url, CheckSitesBookmarkletHandler), (r'/login', LoginHandler), (r'/logout', LogoutHandler), ] for servlet in (APIServlet, ChecklistServlet, ChecklistToggleServlet, RequestServlet, RequestsServlet, NewRequestServlet, PickMeRequestServlet, UnpickMeRequestServlet, AddRequestServlet, RemoveRequestServlet, VerifyRequestServlet, DiscardRequestServlet, DelayRequestServlet, UndelayRequestServlet, CommentRequestServlet, PingMeServlet, PushServlet, PushesServlet, EditPushServlet, DiscardPushServlet, DeployPushServlet, BlessPushServlet, LivePushServlet, NewPushServlet, PushItemsServlet, PushByRequestServlet, UserListServlet, SummaryForBranchServlet, MsgServlet): url_specs.append(get_servlet_urlspec(servlet)) return url_specs
def get_handlers(self): return [get_servlet_urlspec(DeployPushServlet)]
def test_servlet_urlspec(self): T.assert_equal(get_servlet_urlspec(PushesServlet), (r"/pushes", PushesServlet))
def get_handlers(self): return [ util.get_servlet_urlspec(PushServlet), ]
def get_handlers(self): return [get_servlet_urlspec(APIServlet)]
def get_handlers(self): return [get_servlet_urlspec(DelayRequestServlet)]
def get_handlers(self): return [get_servlet_urlspec(DiscardRequestServlet)]
from __future__ import with_statement import os import tornado.httpserver import tornado.process from core.application import Application import core.db as db from core.settings import Settings from core.util import get_servlet_urlspec from servlets.api import APIServlet import ui_modules api_application = tornado.web.Application( # Servlet dispatch rules [ get_servlet_urlspec(APIServlet), ], # Server settings static_path=os.path.join(os.path.dirname(__file__), "static"), template_path=os.path.join(os.path.dirname(__file__), "templates"), gzip=True, login_url="/login", cookie_secret=Settings['cookie_secret'], ui_modules=ui_modules, autoescape=None, ) class PushManagerAPIApp(Application): name = "api"
def get_handlers(self): return [get_servlet_urlspec(PickMeRequestServlet)]
def get_handlers(self): return [ get_servlet_urlspec(SummaryForBranchServlet), ]
from __future__ import with_statement import os import tornado.httpserver import tornado.process from core.application import Application import core.db as db from core.settings import Settings from core.util import get_servlet_urlspec from servlets.api import APIServlet import ui_modules api_application = tornado.web.Application( # Servlet dispatch rules [ get_servlet_urlspec(APIServlet), ], # Server settings static_path = os.path.join(os.path.dirname(__file__), "static"), template_path = os.path.join(os.path.dirname(__file__), "templates"), gzip = True, login_url = "/login", cookie_secret = Settings['cookie_secret'], ui_modules = ui_modules, autoescape = None, ) class PushManagerAPIApp(Application): name = "api" def start_services(self):
def get_handlers(self): return [get_servlet_urlspec(NewPushServlet)]
def get_handlers(self): return [util.get_servlet_urlspec(PushServlet)]
def get_handlers(self): return [get_servlet_urlspec(LivePushServlet)]
def get_handlers(self): return [get_servlet_urlspec(BlessPushServlet)]
def get_handlers(self): return [get_servlet_urlspec(ChecklistServlet)]
def get_handlers(self): return [get_servlet_urlspec(RemoveRequestServlet)]
def get_handlers(self): return [ get_servlet_urlspec(PushesServlet), ]