示例#1
0
 def post(self):
     logging.info("ViewerUnPair")
     user = ModelLoader.get_user(users.get_current_user().user_id())
     viewer = ModelLoader.get_viewer(user,
                                     self.request.POST.get("viewer_id"))
     if viewer != None:
         viewer.delete()
示例#2
0
 def post(self):
     logging.info("ViewerPair")
     user = ModelLoader.get_user(users.get_current_user().user_id())
     viewer = ModelLoader.get_viewer(user,self.request.POST.get("viewer_id"),self.request.POST.get("viewer_name"))
             
     self.response.headers['Content-Type'] = 'application/json';
     self.response.out.write(json.dumps({'token':viewer.token}));
示例#3
0
    def post(self):
        logging.info("ViewerPair")
        user = ModelLoader.get_user(users.get_current_user().user_id())
        viewer = ModelLoader.get_viewer(user,
                                        self.request.POST.get("viewer_id"),
                                        self.request.POST.get("viewer_name"))

        self.response.headers['Content-Type'] = 'application/json'
        self.response.out.write(json.dumps({'token': viewer.token}))
示例#4
0
 def get(self):
     self.response.headers['Content-Type'] = 'text/plain'
     self.response.write(
         'Hello, ' +
         str(ModelLoader.get_user(users.get_current_user().user_id())))
示例#5
0
 def post(self):
     logging.info("ViewerUnPair")
     user = ModelLoader.get_user(users.get_current_user().user_id())
     viewer = ModelLoader.get_viewer(user,self.request.POST.get("viewer_id"))
     if viewer != None:
         viewer.delete()
示例#6
0
 def get(self):
     self.response.headers['Content-Type'] = 'text/plain'
     self.response.write('Hello, ' + str(ModelLoader.get_user(users.get_current_user().user_id())))