Exemplo n.º 1
0
 def get(self, robot_id):
     robot = Robot.query(Robot.robot_id == robot_id).get()
     if None is robot:
         self.response.set_status(404, "robot not found")
         return
     # CALLING ALL ROBOTS!
     all_robot_keys = Robot.query().order(Robot.created).fetch(keys_only=True)
     all_robots = ndb.get_multi(all_robot_keys) # all gets seed memcache
     context = {"tracked_robot": robot, "robots": all_robots}
     render_template(self.response, 'index.html', context)
Exemplo n.º 2
0
 def get(self):
     # CALLING ALL ROBOTS!
     all_robot_keys = Robot.query().order(Robot.created).fetch(keys_only=True)
     all_robots = ndb.get_multi(all_robot_keys) # all gets seed memcache
     render_template(self.response, 'index.html', {"robots": all_robots})
Exemplo n.º 3
0
 def get(self):
     render_template(self.response, 'index.html')