def get(self): query = WeatherStation.all() query.filter('timesNotUpdated >=', 200) text = "{\"station\":[" if query.count(1) > 0: for station in query: text += str(station.id) + "," text = text.replace(' ', '')[:-1] text += "]}" self.response.out.write(text)
def get(self): query = WeatherStation.all() query.filter('timesNotUpdated >=', 200) text = "{\"station\":[" if query.count(1)>0: for station in query: text += str(station.id) + "," text = text.replace(' ', '')[:-1] text += "]}" self.response.out.write(text)