开发者

How do I get the Application ID at runtime

I need the Application ID to construct the correct <applicationid>.appspotmail.com address, and I'm having a hard time f开发者_如何学编程inding out how to retrieve it at runtime.


The recommended approach now is to use app_identity.get_application_id():

http://code.google.com/appengine/docs/python/appidentity/functions.html#get_application_id

See the warning box here for details:

http://code.google.com/appengine/docs/python/runtime.html#Requests_and_Domains


You can get it using:

os.environ['APPLICATION_ID']
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜