skip to Main Content

Json – Get request data from the front end to flask is handled perfectly fine at the local host but not in the server

I am using this code to send data to the front end and then redirect it to another function. @app.route('/get_destination_data', methods=['GET', 'POST']) def get_destination_data(): data = request.get_json() return jsonify({'redirect': url_for("show_destination_info", city_info=data)}) @app.route('/show_destination_info/<city_info>', methods=['GET', 'POST']) def show_destination_info(city_info): return render_template('city-info.html', data=eval(city_info), lists=UserLists.query.filter_by(user_id=current_user.id).all())…

VIEW QUESTION

Javascript – I need to find the total number of occurrences of a particular item in JSON Response using postman tool

[ { "branchCode": "111", "referenceNumber": "2222", "comments": "Write Off", "transactionDate": "2022-02-23T00:00:00", "amount": 0, "accountCode": "MMMM", "accountName": "Metal MMMM", "allocations": [ { "branchCode": "111", "referenceNumber": "3333", "allocationDate": "2022-02-23T09:23:57", "ledgerTypeDescription": "Client", "accountCode": "MMMM", "accountName": "Metal MMMM", "amount": -0.02 } ] }, {…

VIEW QUESTION
Back To Top
Search