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


Python recording.appstats_wsgi_middleware方法代码示例

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


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

示例1: get_instance

# 需要导入模块: from google.appengine.ext.appstats import recording [as 别名]
# 或者: from google.appengine.ext.appstats.recording import appstats_wsgi_middleware [as 别名]
def get_instance():
    global _instance
    if _instance is not None:
        return _instance
    from webapp2 import WSGIApplication
    from argeweb.core import errors
    from argeweb.core import routing
    settings, s = get_setting()
    appstats_settings = s['appstats']
    app_config_settings = s['app_config']
    debug = True
    _instance = WSGIApplication(
        debug=debug, config=app_config_settings)
    # Custom Error Handlers
    if debug is False:
        _instance.error_handlers[400] = errors.handle_400
        _instance.error_handlers[401] = errors.handle_401
        _instance.error_handlers[403] = errors.handle_403
        _instance.error_handlers[404] = errors.handle_404
        _instance.error_handlers[500] = errors.handle_500
    routing.auto_route(_instance.router, debug, version)

    return recording.appstats_wsgi_middleware(_instance) 
开发者ID:argeweb,项目名称:start,代码行数:25,代码来源:application.py

示例2: webapp_add_wsgi_middleware

# 需要导入模块: from google.appengine.ext.appstats import recording [as 别名]
# 或者: from google.appengine.ext.appstats.recording import appstats_wsgi_middleware [as 别名]
def webapp_add_wsgi_middleware(app):
    from google.appengine.ext.appstats import recording
    app = recording.appstats_wsgi_middleware(app)
    return app 
开发者ID:HackPucBemobi,项目名称:touch-pay-client,代码行数:6,代码来源:appengine_config.example.py

示例3: webapp_add_wsgi_middleware

# 需要导入模块: from google.appengine.ext.appstats import recording [as 别名]
# 或者: from google.appengine.ext.appstats.recording import appstats_wsgi_middleware [as 别名]
def webapp_add_wsgi_middleware(app):
  from google.appengine.ext.appstats import recording
  app = recording.appstats_wsgi_middleware(app)
  return app 
开发者ID:lipis,项目名称:electron-crash-reporter,代码行数:6,代码来源:appengine_config.py

示例4: webapp_add_wsgi_middleware

# 需要导入模块: from google.appengine.ext.appstats import recording [as 别名]
# 或者: from google.appengine.ext.appstats.recording import appstats_wsgi_middleware [as 别名]
def webapp_add_wsgi_middleware(app):
    if DEBUG:
        from google.appengine.ext.appstats import recording
        app = recording.appstats_wsgi_middleware(app)
    return app 
开发者ID:rbanffy,项目名称:naziscore,代码行数:7,代码来源:appengine_config.py


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