Python 如何在GAE上使用webapp服务静态网页
我想知道如何使用webapp框架为GAE提供静态HTML页面。使用python,api声明Python 如何在GAE上使用webapp服务静态网页,python,html,google-app-engine,web-applications,Python,Html,Google App Engine,Web Applications,我想知道如何使用webapp框架为GAE提供静态HTML页面。使用python,api声明 self.response.out.write(htmlcontent) 有没有办法只提供html文件名,然后GAE自动为其提供服务器?或者我必须使用上述功能手动加载文件并放入内容吗?您可以在app.yaml中提供这样的静态HTML页面: - url: / static_files: main.html upload: main\.html 这将在应用程序的根(/)上提供文件main.html
self.response.out.write(htmlcontent)
有没有办法只提供html文件名,然后GAE自动为其提供服务器?或者我必须使用上述功能手动加载文件并放入内容吗?您可以在
app.yaml
中提供这样的静态HTML页面:
- url: /
static_files: main.html
upload: main\.html
这将在应用程序的根(/
)上提供文件main.html