Exemplo n.º 1
0
Arquivo: home.py Projeto: ih/focusbell
 def post(self):
     # todo it'd be nice to process the request data as json
     was_focused = False
     if self.request.get("was_focused") == "true":
         was_focused = True
     session = FocusSession.get(self.request.get("session"))
     interval = int(self.request.get("interval"))
     alert = Alert(was_focused=was_focused, session=session, interval=interval)
     alert.put()