如何在IntegerProperty和int之间进行算术运算

时间:2014-01-04 15:50:23

标签: python google-app-engine

class MainHandler(webapp2.RequestHandler):
    def post(self):
        user_spot = parking()
        user_spot.location_X = payload['location_X']
        user_spot.location_Y = payload['location_Y']               
        query = None
        query = parking.query(parking.location_X - 10>= user_spot.location_X ,parking.location_X + 10 <= user_spot.location_X)

我正在尝试运行此查询,但我不能因为int和整数属性不一样

关于如何做的任何想法?

1 个答案:

答案 0 :(得分:1)

好吧,我发现了这个问题 query = parking.query(parking.location_X 10&gt; = user_spot.location_X -10,parking.location_X&lt; = user_spot.location_X + 10) 只需将算术移动到int