when i was about to write a sub module for my app, i’d like to put all the stuffs in a sub folder like /foo, and i give the script the name foo.py and in it there’s a
app = webapp2.WSGIApplication([('/foo/', Index)])
then it comes to
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
then i set it to false, it becomes error 500
ImportError: Could not find module foo.foo.app
my app.yaml is like
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
finally i solved like this:
__init__.pyin the folderfoo/, leave it empty.foo/foo.apptofoo.foo.appand it seems has nothing to do with
threadsafe, i changed it totrueand it’s still working.