def update_action(self): id = int(self.request.get('id')) name = self.request.get('name') task = Task.get_by_id(id) task.set_origin_name(name) task.put() output = simplejson.dumps(task.to_dict()) self.response.out.write(output)
def complete_action(self): id = int(self.request.get('id')) task = Task.get_by_id(id) task.is_completed = True; task.complete_time = datetime.datetime.now() task.put()