当我要为我的应用程序编写一个子模块时,我想把所有的东西放在一个子文件夹中,比如/foo
,我给脚本命名foo.py
,里面有一个
app = webapp2.WSGIApplication([('/foo/', Index)])
然后到了
Fatal error when loading application configuration:
threadsafe cannot be enabled with CGI handler: foo/foo.app
in "/home/***/workspace/***/app.yaml", line 23, column 20
然后我将它设置为false,它变成错误500
ImportError: Could not find module foo.foo.app
我app.yaml
的就像
application: ***
version: alpha
runtime: python27
api_version: 1
threadsafe: false
handlers:
- url: /static
static_dir: static
- url: /admin.*
script: admin.app
login: admin
- url: /foo
script: foo/foo.app
- url: /.*
script: index.app