是否可以通过编程方式获取当前应用程序版本,以便在具有远期过期 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/