user2887317
user2887317

Reputation: 21

dynamic query google app engine

I was experimenting with Queries in Google App Engine using Python. Can't I do something like this?

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

But if I do this,

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

the query is working.

Please help me. Thanks!

Upvotes: 0

Views: 44

Answers (1)

Sean Fujiwara
Sean Fujiwara

Reputation: 4546

I'm guessing you don't want the quotes around the region name itself:

region = 'Malaysia'

Upvotes: 1

Related Questions