def get_url_specs(): url_specs = [ (r"/", SmartDestServlet), (r"favicon.*", NullRequestHandler), (CreateRequestBookmarkletHandler.url, CreateRequestBookmarkletHandler), (CheckSitesBookmarkletHandler.url, CheckSitesBookmarkletHandler), (r"/login", LoginHandler), (r"/logout", LogoutHandler), (r"/acs", SamlACSHandler), ] for servlet in ( APIServlet, ChecklistServlet, ChecklistToggleServlet, ConflictCheckServlet, 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, TestTagServlet, ): 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), (r'/acs', SamlACSHandler), ] for servlet in (APIServlet, ChecklistServlet, ChecklistToggleServlet, ConflictCheckServlet, 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, TestTagServlet): url_specs.append(get_servlet_urlspec(servlet)) return url_specs
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(MsgServlet)]
def get_handlers(self): return [get_servlet_urlspec(NewPushServlet)]
def get_handlers(self): return [get_servlet_urlspec(DeployPushServlet)]
def get_handlers(self): return [get_servlet_urlspec(ChecklistServlet)]
def get_handlers(self): return [ get_servlet_urlspec(SummaryForBranchServlet), ]
def get_handlers(self): return [get_servlet_urlspec(AddRequestServlet)]
def test_servlet_urlspec(self): T.assert_equal(get_servlet_urlspec(PushesServlet), (r"/pushes", PushesServlet))
import os import pushmanager.core.db as db import tornado.httpserver import tornado.process import pushmanager.ui_modules as ui_modules from pushmanager.core.application import Application from pushmanager.core.settings import Settings from pushmanager.core.util import get_servlet_urlspec from pushmanager.servlets.api import APIServlet 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"), login_url="/login", cookie_secret=Settings['cookie_secret'], ui_modules=ui_modules, autoescape=None, ) class PushManagerAPIApp(Application): name = "api" def start_services(self):
import os import pushmanager.core.db as db import tornado.httpserver import tornado.process import pushmanager.ui_modules as ui_modules from pushmanager.core.application import Application from pushmanager.core.settings import Settings from pushmanager.core.util import get_servlet_urlspec from pushmanager.servlets.api import APIServlet 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(BlessPushServlet)]
def get_handlers(self): return [get_servlet_urlspec(APIServlet)]
def get_handlers(self): return [ get_servlet_urlspec(PushItemsServlet), ]
def get_handlers(self): return [ get_servlet_urlspec(PushesServlet), ]