【问题标题】:Google AppEngine App Version谷歌 AppEngine 应用版本
【发布时间】:2010-09-22 07:06:35
【问题描述】:

是否可以以编程方式获取当前应用程序版本,以用于具有远期过期标头的 url?

例如:

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

应自动更新为:

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

为此,我需要获取版本。

【问题讨论】:

    标签: python google-app-engine


    【解决方案1】:

    来自 [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
    

    【讨论】:

    • 谢谢!我一直在寻找 appengine 网站,但由于某种原因无法找到它。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-13
    • 2012-01-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-19
    相关资源
    最近更新 更多