【发布时间】:2013-02-11 09:43:55
【问题描述】:
我有这样的数据结构:
我正在尝试通过 $.ajax 将其发送到服务器:
$.ajax({
type: 'POST',
data: post_obj, //this is my json data
dataType: 'json',
url: '',
success: function(e){
console.log(e);
}
});
我想通过烧瓶将它放入服务器:title = request.form['title'] 工作正常!
但是我如何获得content?
request.form.getlist('content') 不起作用。
这是firebug中的post数据:
非常感谢:D
【问题讨论】:
-
content = request.form['content']怎么样? :) -
@favoretti 无法工作:
BadValueException: Bad value for field of type "content". Reason: "Value is not an instance of <type 'basestring'> (got: list)" -
好的,
request.form.getlist('content')返回什么?关于“不起作用”的更多细节可能会有所帮助。不幸的是,这里没有手边的烧瓶来测试。 -
它返回与
request.form['content']相同的错误。 ps:在萤火虫中发布数据可能会有所帮助。