【问题标题】:How do I return an html file in a Google App Engine response?如何在 Google App Engine 响应中返回 html 文件?
【发布时间】:2015-01-16 02:49:42
【问题描述】:

使用 Google 提供的示例,他们经常使用以下方法对 html 响应进行编码:

self.response.write( "<html><p>Some stuff!</p></html>" )

这是对 html 进行硬编码的一种糟糕方式,如果我想发回一个漂亮的页面或预制、设计精美的响应页面,似乎应该有一种方法可以将用户直接重定向到实际的 nice_response.html

我似乎找不到任何有关如何执行此操作的示例或文档。我是不是搞错了,还是有一种简单的方法可以将请求定向到 real HTML 页面,而无需对响应 html 进行硬编码?

谢谢

【问题讨论】:

    标签: python html google-app-engine server google-cloud-datastore


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-17
      • 1970-01-01
      • 1970-01-01
      • 2011-04-06
      • 1970-01-01
      • 2010-10-23
      • 1970-01-01
      • 2023-03-17
      相关资源
      最近更新 更多