def get(self): self.write("<a href='/gimme-points'>Gimme XP!</a>") user = User(self.get_argument("user", "anon")) pts = point.get("experience") res = yield gen.Task(pts.get_count, ds, user) self.write("<p>You currently have {0} XP</p>".format(res)) self.finish()
def get(self): user = User(self.get_argument("user", "anon")) pts = point.get("experience") res = yield gen.Task(pts.award, ds, user, 10) self.write("Yay you now have {0} points".format(res)) self.finish()