动态查询谷歌应用引擎

时间:2013-10-16 16:52:43

标签: google-app-engine python-2.7

我正在使用Python在Google App Engine中试验查询。我不能做这样的事吗?

region = '"Malaysia"'
result = Post.query(Post.page_market.IN([region])).order(Post.created_time)

但如果我这样做,

result = Post.query(Post.page_market.IN(["Malaysia"])).order(Post.created_time)

查询正在运行。

请帮帮我。谢谢!

1 个答案:

答案 0 :(得分:1)

我猜你不希望区域名称周围的引号:

region = 'Malaysia'