查询:
mid = int(self.request.get('mid'))
marker = Marker.get_by_id(mid)
self.response.out.write('%s' % marker.click)
查询并更新,Datastore真的很方便:
mid = int(self.request.get('mid'))
marker = Marker.get_by_id(mid)
click = marker.click
click += 1
marker.click = click
marker.put()
self.response.out.write('%s' % click)
No comments:
Post a Comment