class MainPage(webapp.RequestHandler): def get(self): self.response.out.write('Welcome to Wattcher!

Here are the last 10 datapoints:

') powerusages = db.GqlQuery("SELECT * FROM Powerusage ORDER BY date DESC LIMIT 10") for powerused in powerusages: if powerused.sensornum: self.response.out.write('%s\'s sensor #%d' % (powerused.author.nickname(), powerused.sensornum)) else: self.response.out.write('%s' % powerused.author.nickname()) self.response.out.write(' used: %f Watts at %s

' % (powerused.watt, powerused.date)) self.response.out.write("")