def consulting_reply_update(self, request, uid):
     content = json.load(request.content)
     content['uid'] = uid
     resp = yield self.update_service_execute(
         ModelRequest(*get_model_request_args(request.args),
                      item=ConsultingReply(**content)))
     return jsonpickle.encode(resp, unpicklable=False)
Beispiel #2
0
 def consulting_create(self, request):
     content = json.load(request.content)
     item = Consulting(**content)
     item.clicked = 0
     resp = yield self.update_service_execute(
             ModelRequest(*get_model_request_args(request.args), item=item))
     return jsonpickle.encode(resp, unpicklable=False)
 def consulting_reply_get_all(self, request):
     resp = yield self.search_service_execute(
         ModelRequest(*get_model_request_args(request.args),
                      item=ConsultingReply(uid=request.args.get(
                          'uid', [''])[0],
                                           consulting_uid=request.args.get(
                                               'consulting_uid', [''])[0])))
     return jsonpickle.encode(resp, unpicklable=False)
Beispiel #4
0
 def consulting_get_all(self, request):
     resp = yield self.search_service_execute(
             ModelRequest(*get_model_request_args(request.args),
                          item=Consulting(uid=request.args.get('uid', [''])[0],
                                          subject=request.args.get('subject', [''])[0],
                                          body=request.args.get('body', [''])[0],
                                          author=request.args.get('author', [''])[0])))
     yield self.set_reply_item(resp.items)
     return jsonpickle.encode(resp, unpicklable=False)
 def consulting_reply_get(self, request, uid):
     resp = yield self.search_service_execute(
         ModelRequest(*get_model_request_args(request.args),
                      item=ConsultingReply(uid=uid)))
     return jsonpickle.encode(resp, unpicklable=False)