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

Class Application

demos/facebook/facebook.py:28–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27
28class Application(tornado.web.Application):
29 def __init__(self):
30 handlers = [
31 (r"/", MainHandler),
32 (r"/auth/login", AuthLoginHandler),
33 (r"/auth/logout", AuthLogoutHandler),
34 ]
35 settings = dict(
36 cookie_secret="__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__",
37 login_url="/auth/login",
38 template_path=os.path.join(os.path.dirname(__file__), "templates"),
39 static_path=os.path.join(os.path.dirname(__file__), "static"),
40 xsrf_cookies=True,
41 facebook_api_key=options.facebook_api_key,
42 facebook_secret=options.facebook_secret,
43 ui_modules={"Post": PostModule},
44 debug=True,
45 autoescape=None,
46 )
47 tornado.web.Application.__init__(self, handlers, **settings)
48
49
50class BaseHandler(tornado.web.RequestHandler):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected