from flask import Flask, render_template, request, jsonify from services import Services app = Flask("Project Fish") services = Services() @app.route('/') def index(): return render_template("index.html") @app.route("/GetServices", methods=['GET', 'POST']) def GetServices(): nummer = (request.json)["nummer"] if(nummer != None and nummer != ""): ser=services.GetServices(nummer) return jsonify(render_template("results.html", services=ser),) ser = services.GetAllServices() return render_template("results.html", services=ser) def RunWeb(): app.run(debug=True) @app.route('/', methods=['POST']) def my_form_post(): text = request.form['text'] processed_text = text.upper() print(f'Inputted text is: {processed_text}') return processed_text