Exemple #1
0
 def put(self, user=None, **kwargs):
     response = {}
     user_resource = UserResource(request.json, model=user)
     if user_resource.is_valid():
         try:
             user_resource.update()
             response["user"] = user_resource.to_serializable_dict()
         except Exception as error:
             print error
             pass
     return self.json_response(data=response)
Exemple #2
0
 def put(self, user=None, **kwargs):
     response = {}
     user_resource = UserResource(request.json, model=user)
     if user_resource.is_valid():
         try:
             user_resource.update()
             response['user'] = user_resource.to_serializable_dict()
         except Exception as error:
             print error
             pass
     return self.json_response(data=response)