def update_item(self, item_id):
     coll = self.mongo.db[self.name]
     coll.save(json_load(request.data))
     return jsonify({'message': 'OK'})
 def create_item(self):
     coll = self.mongo.db[self.name]
     item = json_load(request.data)
     coll.save(item)
     return jsonify(item)