Python / AppEngine:获取客户端浏览器信息

时间:2011-08-13 11:45:56

标签: python google-app-engine browser

如何使用Python / AppEngine获取客户端浏览器信息(类型,版本等)?

1 个答案:

答案 0 :(得分:5)

从User-Agent标题:

user_agent_string = self.request.headers['user-agent']

http://code.google.com/appengine/docs/python/tools/webapp/requestclass.html#Request_headers