Python 谷歌应用引擎:获取表单字段

Python 谷歌应用引擎:获取表单字段,python,google-app-engine,Python,Google App Engine,如何访问表单数据。我想在执行有效之前执行此操作。如何访问字段。但我似乎得到了一个空白地址 代码如下所示: def post(self): data = CompanyForm(data=self.request.POST) map_url = '' address = str(data['company_postcode']) address = address.replace(' ', '') 执行此操作的最佳方法是什么?根据请求,请求没有POST实

如何访问表单数据。我想在执行有效之前执行此操作。如何访问字段。但我似乎得到了一个空白地址

代码如下所示:

def post(self):
    data = CompanyForm(data=self.request.POST)
    map_url = ''    
    address = str(data['company_postcode'])

    address = address.replace(' ', '')
执行此操作的最佳方法是什么?

根据请求,请求没有POST实例变量。您可以调用self.request.get'company\u postcode'来获取company\u postcode的发布值

为了进行调试,可以从self.request.body获取原始POST数据。

根据,请求没有POST实例变量。您可以调用self.request.get'company\u postcode'来获取company\u postcode的发布值

为了进行调试,可以从self.request.body获取原始POST数据。

google.appengine.ext.webapp.request是一个webob.request子类;虽然从webob继承的东西没有记录在链接页面上,但它们都在那里。google.appengine.ext.webapp.Request是一个webob.Request子类;虽然从webob继承的东西没有记录在链接页面上,但它们都在那里。