Python 如何在IntegerProperty和int之间进行算术运算 class MainHandler(webapp2.RequestHandler): def post(自我): 用户\停车位=停车位() user_spot.location_X=有效载荷['location_X'] 用户_spot.location_Y=有效载荷['location_Y'] 查询=无 query=parking.query(parking.location\u X-10>=user\u spot.location\u X,parking.location\u X+10
确定我找到了解决方案 query=parking.query(parking.location\u X 10>=用户\u spot.location\u X-10,parking.location\u XPython 如何在IntegerProperty和int之间进行算术运算 class MainHandler(webapp2.RequestHandler): def post(自我): 用户\停车位=停车位() user_spot.location_X=有效载荷['location_X'] 用户_spot.location_Y=有效载荷['location_Y'] 查询=无 query=parking.query(parking.location\u X-10>=user\u spot.location\u X,parking.location\u X+10,python,google-app-engine,Python,Google App Engine,确定我找到了解决方案 query=parking.query(parking.location\u X 10>=用户\u spot.location\u X-10,parking.location\u X class MainHandler(webapp2.RequestHandler): def post(self): user_spot = parking() user_spot.location_X = payload['location_X']
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)