新しい GAE プロジェクトをセットアップしていますが、サブディレクトリ内のスクリプトを動作させることができません。
編集: 私が行った場合localhost:8080/testing_desc.html
、エラーはありません。空白のページです (ビューソースも空白です)。ルート ディレクトリのスクリプトは正常に動作します。__init__.py
ルートとサブディレクトリの両方にa があります。
Python スクリプトの例 ("/testing/testing_desc.py"):
import webapp2 as webapp
class DescTstPage(webapp.RequestHandler):
def get(self):
html = 'This should work.'
self.response.out.write(html)
app = webapp.WSGIApplication([('/.*', DescTstPage)], debug=True)
app.yaml:
application: blah
version: blah
runtime: python27
api_version: 1
default_expiration: "5d 12h"
threadsafe: false
libraries:
- name: webapp2
version: latest
handlers:
- url: / <-- This one works
script: main.app
- url: /index.html <-- This does NOT work (??)
script: main.app
- url: /(.*?)_desc.html <-- Also does NOT work
script: \1/\1_desc.app
#file not found
- url: /.*
script: file_not_found.app
より単純なバージョンの yaml も試しました。
-url: /testing_desc.html
script: /testing/testing_desc.app