当前位置: 首页>>代码示例>>Python>>正文


Python StaticFileHandler.initialize方法代码示例

本文整理汇总了Python中tornado.web.StaticFileHandler.initialize方法的典型用法代码示例。如果您正苦于以下问题:Python StaticFileHandler.initialize方法的具体用法?Python StaticFileHandler.initialize怎么用?Python StaticFileHandler.initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tornado.web.StaticFileHandler的用法示例。


在下文中一共展示了StaticFileHandler.initialize方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: initialize

# 需要导入模块: from tornado.web import StaticFileHandler [as 别名]
# 或者: from tornado.web.StaticFileHandler import initialize [as 别名]
 def initialize(self, **kwargs):
     if 'no_cache' in kwargs:
         self._no_cache = kwargs['no_cache']
         del kwargs['no_cache']
     else:
         self._no_cache = False
     StaticFileHandler.initialize(self, **kwargs)
开发者ID:dropmann,项目名称:silky,代码行数:9,代码来源:server.py

示例2: initialize

# 需要导入模块: from tornado.web import StaticFileHandler [as 别名]
# 或者: from tornado.web.StaticFileHandler import initialize [as 别名]
    def initialize(self):
        # return custom type directly. The browser will do the parsing
        self.custom_type = None

        uri = self.get_argument('uri')

        try:
            self.modgui = get_plugin_gui(uri)
        except:
            raise HTTPError(404)

        try:
            root = self.modgui['resourcesDirectory']
        except:
            raise HTTPError(404)

        return StaticFileHandler.initialize(self, root)
开发者ID:,项目名称:,代码行数:19,代码来源:

示例3: initialize

# 需要导入模块: from tornado.web import StaticFileHandler [as 别名]
# 或者: from tornado.web.StaticFileHandler import initialize [as 别名]
 def initialize(self, path, default_filename=None):
     StaticFileHandler.initialize(self, path, default_filename)
开发者ID:flashhtml5,项目名称:PyF5,代码行数:4,代码来源:default.py

示例4: initialize

# 需要导入模块: from tornado.web import StaticFileHandler [as 别名]
# 或者: from tornado.web.StaticFileHandler import initialize [as 别名]
	def initialize(self, path, default_filename=None, as_attachment=False, access_validation=None):
		StaticFileHandler.initialize(self, path, default_filename)
		self._as_attachment = as_attachment
		self._access_validation = access_validation
开发者ID:C-o-r-E,项目名称:OctoPrint,代码行数:6,代码来源:util.py

示例5: initialize

# 需要导入模块: from tornado.web import StaticFileHandler [as 别名]
# 或者: from tornado.web.StaticFileHandler import initialize [as 别名]
 def initialize(self):
     StaticFileHandler.initialize(self, os.path.join(os.path.dirname(__file__), "data"))
开发者ID:cms-dev,项目名称:tws,代码行数:4,代码来源:TranslationWebServer.py

示例6: initialize

# 需要导入模块: from tornado.web import StaticFileHandler [as 别名]
# 或者: from tornado.web.StaticFileHandler import initialize [as 别名]
 def initialize(self, path, default_filename=None, as_attachment=False):
     StaticFileHandler.initialize(self, path, default_filename)
     self._as_attachment = as_attachment
开发者ID:d42,项目名称:octoprint-fork,代码行数:5,代码来源:util.py

示例7: initialize

# 需要导入模块: from tornado.web import StaticFileHandler [as 别名]
# 或者: from tornado.web.StaticFileHandler import initialize [as 别名]
 def initialize(self, path, default_filename=None):
     self._check_dir_(path)
     StaticFileHandler.initialize(self, path, default_filename)
开发者ID:blueshed,项目名称:blueshed-py,代码行数:5,代码来源:upload_handler.py

示例8: initialize

# 需要导入模块: from tornado.web import StaticFileHandler [as 别名]
# 或者: from tornado.web.StaticFileHandler import initialize [as 别名]
 def initialize(self, path, default_filename=None, others=None):
     StaticFileHandler.initialize(self, path, default_filename)
     self._others = others if others else self.application.settings["static_handler_args"]["others"]
开发者ID:blueshed,项目名称:blueshed-py,代码行数:5,代码来源:static_handler.py

示例9: initialize

# 需要导入模块: from tornado.web import StaticFileHandler [as 别名]
# 或者: from tornado.web.StaticFileHandler import initialize [as 别名]
 def initialize(self):
     StaticFileHandler.initialize(self, UPLOAD_PATH)
开发者ID:coldnight,项目名称:vlog,代码行数:4,代码来源:index.py

示例10: initialize

# 需要导入模块: from tornado.web import StaticFileHandler [as 别名]
# 或者: from tornado.web.StaticFileHandler import initialize [as 别名]
	def initialize(self):
		StaticFileHandler.initialize(self, 
			self.controllers[Resource].styles_file_dir)
开发者ID:chfoo,项目名称:Photon-Vault,代码行数:5,代码来源:resource.py


注:本文中的tornado.web.StaticFileHandler.initialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。