MCPcopy
hub / github.com/tornadoweb/tornado / Application

Class Application

demos/blog/blog.py:53–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51
52
53class Application(tornado.web.Application):
54 def __init__(self, db):
55 self.db = db
56 handlers = [
57 (r"/", HomeHandler),
58 (r"/archive", ArchiveHandler),
59 (r"/feed", FeedHandler),
60 (r"/entry/([^/]+)", EntryHandler),
61 (r"/compose", ComposeHandler),
62 (r"/auth/create", AuthCreateHandler),
63 (r"/auth/login", AuthLoginHandler),
64 (r"/auth/logout", AuthLogoutHandler),
65 ]
66 settings = dict(
67 blog_title="Tornado Blog",
68 template_path=os.path.join(os.path.dirname(__file__), "templates"),
69 static_path=os.path.join(os.path.dirname(__file__), "static"),
70 ui_modules={"Entry": EntryModule},
71 xsrf_cookies=True,
72 cookie_secret="__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__",
73 login_url="/auth/login",
74 debug=True,
75 )
76 super().__init__(handlers, **settings)
77
78
79class BaseHandler(tornado.web.RequestHandler):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected