def create_show(): request_data = request.get_json() nem_show = show.ShowModel(request_data['name']) nem_show.save_to_db() print(nem_show.id) result = show.ShowModel.find_by_id(nem_show.id) return jsonify(result.json())
def create_show(): request_data = request.get_json() new_show = show.ShowModel(request_data["name"]) new_show.save_to_db() #print("NOVO ID: {0}".format(new_show.id)) result = show.ShowModel.find_by_id(new_show.id) return jsonify(result.json())