當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。