【问题标题】:Yaml script handlers when porting App Engine app to Python 2.7将 App Engine 应用程序移植到 Python 2.7 时的 Yaml 脚本处理程序
【发布时间】:2012-12-12 04:06:57
【问题描述】:

我在 App Engine 上将 Python 应用程序从 2.5 移植到 2.7,我发现脚本处理程序对于 WSGI 端点的工作方式不同。具体来说,当我的端点应用程序在子目录中定义时,yaml 无法解析。

- url: /crawl/route/.*
  script: crawl/crawler.app
  login: admin

在 Python 2.5 中,“.app”扩展名为“.py”

如果脚本定义没有子目录,则此方法有效。实际上,根目录中的所有应用脚本都可以工作,而子目录中的所有应用脚本都失败。

【问题讨论】:

    标签: google-app-engine python-2.7 yaml


    【解决方案1】:

    不是路径,是python对象,所以用

    script: crawl.crawler.app
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-28
      • 2015-05-29
      • 1970-01-01
      • 2011-08-12
      • 2010-11-10
      • 2019-12-06
      相关资源
      最近更新 更多