python - Google AppEngine 应用程序版本

标签 python google-app-engine

是否可以通过编程方式获取当前应用程序版本,以便在具有远期过期 header 的 URL 中使用?

例如:

<link rel="stylesheet" href="app.js?v=1.23" />

应自动更新为:

<link rel="stylesheet" href="app.js?v=1.24" />

为此,我需要获取版本。

最佳答案

来自 [ http://code.google.com/appengine/docs/python/theenvironment.html][1]

from google.appengine.ext import webapp
import os

class PrintEnvironmentHandler(webapp.RequestHandler):
  def get(self):
    for name in os.environ.keys():
      self.response.out.write("%s = %s<br />\n" % (name, os.environ[name]))


  [1]: http://code.google.com/appengine/docs/python/theenvironment.html

关于python - Google AppEngine 应用程序版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/289174/

相关文章:

google-app-engine - 在 Google App Engine 验证/更改应用程序区域

Python - 为什么不继承属性?

Python发送和接收HTTP POST

google-app-engine - 是否可以在不支付 Google Apps 费用的情况下配置 Google App Engine 自定义域?

python - 使用 OpenCV 查找图像中的圆圈数

google-app-engine - 支持 Dart for Google Endpoints 中的查询参数吗?

eclipse - 是否可以使用 Eclipse IDE 和 GAE 插件通过 PlayFramework 开发和部署 Scala 应用程序?

python - pip install mysql-connector-python安装错误

python - 如何判断我的 python 程序是否已向 sys.stdout 写入任何内容(在同一程序内)?

python - 通过可调用对象选择 pandas