【问题标题】:Google Apps Engine reading URL Query (python)Google Apps Engine 读取 URL 查询 (python)
【发布时间】:2012-01-12 12:40:37
【问题描述】:

谁能提供一个如何从 URL 读取和打印“sydney”和“NSW”的示例:

http://xyz.appspot.com/main?city=sydney&state=NSW 

使用def get (name, city, state) 函数?

谢谢

【问题讨论】:

    标签: python google-app-engine url get


    【解决方案1】:

    它的使用非常简单

    def get(self):
      city = self.request.get('city')
      state = self.request.get('state')
    

    这是你得到的第一件事

    Getting started with Google AppEngine

    【讨论】:

      【解决方案2】:

      假设你在 Python 2.7 下使用 webapp2

      退房 http://webapp-improved.appspot.com/guide/handlers.html

      【讨论】:

      • 链接已失效。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-26
      • 1970-01-01
      • 1970-01-01
      • 2011-01-29
      • 1970-01-01
      • 2012-12-20
      相关资源
      最近更新 更多