本文整理汇总了Python中tornado.util.ObjectDict.autoescape方法的典型用法代码示例。如果您正苦于以下问题:Python ObjectDict.autoescape方法的具体用法?Python ObjectDict.autoescape怎么用?Python ObjectDict.autoescape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tornado.util.ObjectDict
的用法示例。
在下文中一共展示了ObjectDict.autoescape方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from tornado.util import ObjectDict [as 别名]
# 或者: from tornado.util.ObjectDict import autoescape [as 别名]
def __init__(self):
settings = ObjectDict()
settings.debug = options.debug
settings.autoescape = None
self.base_dir = os.path.abspath(os.path.dirname(__file__))
settings.template_path = os.path.join(self.base_dir, 'templates')
handlers = [
(r'/', IndexHandler),
(r'/api/torrent/link', TorrentLinkHandler),
(r'/api/torrent/file', TorrentFileHandler),
(r'/api/torrent/bttiantang', TorrentBTTianTangHandler),
]
super(Application, self).__init__(handlers, **settings)
示例2: __init__
# 需要导入模块: from tornado.util import ObjectDict [as 别名]
# 或者: from tornado.util.ObjectDict import autoescape [as 别名]
def __init__(self):
settings = ObjectDict()
settings.debug = options.debug
settings.autoescape = None
self.base_dir = os.path.abspath(os.path.dirname(__file__))
settings.template_path = os.path.join(self.base_dir, 'templates')
settings.static_path = os.path.join(self.base_dir, 'static')
handlers = [
(r'/', IndexHandler),
(r'/upload', IndexHandler),
(r'/myfile', MyFileHandler),
(r'/myfile/list', ListRemoteFileHandler),
(r'/myfile/delete', DeleteRemoteFileHandler),
]
super(Application, self).__init__(handlers, **settings)